/*  _____ _
 * |_   _| |_  _ _ ___ ___ _ __  __ _
 *   | | | ' \| '_/ -_) -_) '  \/ _` |_
 *   |_| |_||_|_| \___\___|_|_|_\__,_(_)
 *
 * Threema for Android
 * Copyright (c) 2020 Threema GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */

package ch.threema.app.mediaattacher.labeling;

import android.content.Context;

import java.util.HashMap;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import ch.threema.app.R;

/**
 * This data structure contains a mapping from image labels to translated textual labels.
 */
public class ImageLabelsIndexHashMap {
	private final HashMap<String, String> mapping;

	public ImageLabelsIndexHashMap(Context context){
		mapping =  new HashMap<String, String>() {{
			put("0", context.getString(R.string.label_0));
			put("1", context.getString(R.string.label_1));
			put("2", context.getString(R.string.label_2));
			put("3", context.getString(R.string.label_3));
			put("4", context.getString(R.string.label_4));
			put("5", context.getString(R.string.label_5));
			put("7", context.getString(R.string.label_7));
			put("8", context.getString(R.string.label_8));
			put("9", context.getString(R.string.label_9));
			put("10", context.getString(R.string.label_10));
			put("11", context.getString(R.string.label_11));
			put("12", context.getString(R.string.label_12));
			put("13", context.getString(R.string.label_13));
			put("14", context.getString(R.string.label_14));
			put("16", context.getString(R.string.label_16));
			put("17", context.getString(R.string.label_17));
			put("18", context.getString(R.string.label_18));
			put("19", context.getString(R.string.label_19));
			put("20", context.getString(R.string.label_20));
			put("21", context.getString(R.string.label_21));
			put("22", context.getString(R.string.label_22));
			put("24", context.getString(R.string.label_24));
			put("25", context.getString(R.string.label_25));
			put("26", context.getString(R.string.label_26));
			put("27", context.getString(R.string.label_27));
			put("28", context.getString(R.string.label_28));
			put("29", context.getString(R.string.label_29));
			put("30", context.getString(R.string.label_30));
			put("31", context.getString(R.string.label_31));
			put("32", context.getString(R.string.label_32));
			put("33", context.getString(R.string.label_33));
			put("34", context.getString(R.string.label_34));
			put("35", context.getString(R.string.label_35));
			put("36", context.getString(R.string.label_36));
			put("37", context.getString(R.string.label_37));
			put("38", context.getString(R.string.label_38));
			put("39", context.getString(R.string.label_39));
			put("40", context.getString(R.string.label_40));
			put("41", context.getString(R.string.label_41));
			put("42", context.getString(R.string.label_42));
			put("43", context.getString(R.string.label_43));
			put("45", context.getString(R.string.label_45));
			put("46", context.getString(R.string.label_46));
			put("47", context.getString(R.string.label_47));
			put("48", context.getString(R.string.label_48));
			put("49", context.getString(R.string.label_49));
			put("50", context.getString(R.string.label_50));
			put("51", context.getString(R.string.label_51));
			put("52", context.getString(R.string.label_52));
			put("53", context.getString(R.string.label_53));
			put("54", context.getString(R.string.label_54));
			put("55", context.getString(R.string.label_55));
			put("56", context.getString(R.string.label_56));
			put("57", context.getString(R.string.label_57));
			put("58", context.getString(R.string.label_58));
			put("59", context.getString(R.string.label_59));
			put("61", context.getString(R.string.label_61));
			put("62", context.getString(R.string.label_62));
			put("63", context.getString(R.string.label_63));
			put("64", context.getString(R.string.label_64));
			put("65", context.getString(R.string.label_65));
			put("66", context.getString(R.string.label_66));
			put("67", context.getString(R.string.label_67));
			put("68", context.getString(R.string.label_68));
			put("69", context.getString(R.string.label_69));
			put("70", context.getString(R.string.label_70));
			put("71", context.getString(R.string.label_71));
			put("72", context.getString(R.string.label_72));
			put("73", context.getString(R.string.label_73));
			put("74", context.getString(R.string.label_74));
			put("75", context.getString(R.string.label_75));
			put("76", context.getString(R.string.label_76));
			put("77", context.getString(R.string.label_77));
			put("78", context.getString(R.string.label_78));
			put("79", context.getString(R.string.label_79));
			put("80", context.getString(R.string.label_80));
			put("81", context.getString(R.string.label_81));
			put("82", context.getString(R.string.label_82));
			put("83", context.getString(R.string.label_83));
			put("84", context.getString(R.string.label_84));
			put("85", context.getString(R.string.label_85));
			put("86", context.getString(R.string.label_86));
			put("87", context.getString(R.string.label_87));
			put("88", context.getString(R.string.label_88));
			put("89", context.getString(R.string.label_89));
			put("90", context.getString(R.string.label_90));
			put("91", context.getString(R.string.label_91));
			put("92", context.getString(R.string.label_92));
			put("93", context.getString(R.string.label_93));
			put("94", context.getString(R.string.label_94));
			put("95", context.getString(R.string.label_95));
			put("96", context.getString(R.string.label_96));
			put("97", context.getString(R.string.label_97));
			put("98", context.getString(R.string.label_98));
			put("99", context.getString(R.string.label_99));
			put("100", context.getString(R.string.label_100));
			put("101", context.getString(R.string.label_101));
			put("102", context.getString(R.string.label_102));
			put("103", context.getString(R.string.label_103));
			put("104", context.getString(R.string.label_104));
			put("105", context.getString(R.string.label_105));
			put("106", context.getString(R.string.label_106));
			put("107", context.getString(R.string.label_107));
			put("108", context.getString(R.string.label_108));
			put("109", context.getString(R.string.label_109));
			put("110", context.getString(R.string.label_110));
			put("111", context.getString(R.string.label_111));
			put("112", context.getString(R.string.label_112));
			put("113", context.getString(R.string.label_113));
			put("114", context.getString(R.string.label_114));
			put("115", context.getString(R.string.label_115));
			put("116", context.getString(R.string.label_116));
			put("117", context.getString(R.string.label_117));
			put("118", context.getString(R.string.label_118));
			put("119", context.getString(R.string.label_119));
			put("120", context.getString(R.string.label_120));
			put("121", context.getString(R.string.label_121));
			put("122", context.getString(R.string.label_122));
			put("123", context.getString(R.string.label_123));
			put("125", context.getString(R.string.label_125));
			put("126", context.getString(R.string.label_126));
			put("127", context.getString(R.string.label_127));
			put("128", context.getString(R.string.label_128));
			put("129", context.getString(R.string.label_129));
			put("130", context.getString(R.string.label_130));
			put("131", context.getString(R.string.label_131));
			put("132", context.getString(R.string.label_132));
			put("133", context.getString(R.string.label_133));
			put("134", context.getString(R.string.label_134));
			put("135", context.getString(R.string.label_135));
			put("137", context.getString(R.string.label_137));
			put("138", context.getString(R.string.label_138));
			put("139", context.getString(R.string.label_139));
			put("140", context.getString(R.string.label_140));
			put("141", context.getString(R.string.label_141));
			put("142", context.getString(R.string.label_142));
			put("143", context.getString(R.string.label_143));
			put("144", context.getString(R.string.label_144));
			put("145", context.getString(R.string.label_145));
			put("146", context.getString(R.string.label_146));
			put("147", context.getString(R.string.label_147));
			put("148", context.getString(R.string.label_148));
			put("149", context.getString(R.string.label_149));
			put("150", context.getString(R.string.label_150));
			put("151", context.getString(R.string.label_151));
			put("152", context.getString(R.string.label_152));
			put("153", context.getString(R.string.label_153));
			put("154", context.getString(R.string.label_154));
			put("155", context.getString(R.string.label_155));
			put("156", context.getString(R.string.label_156));
			put("157", context.getString(R.string.label_157));
			put("158", context.getString(R.string.label_158));
			put("159", context.getString(R.string.label_159));
			put("160", context.getString(R.string.label_160));
			put("161", context.getString(R.string.label_161));
			put("162", context.getString(R.string.label_162));
			put("163", context.getString(R.string.label_163));
			put("164", context.getString(R.string.label_164));
			put("165", context.getString(R.string.label_165));
			put("166", context.getString(R.string.label_166));
			put("167", context.getString(R.string.label_167));
			put("168", context.getString(R.string.label_168));
			put("169", context.getString(R.string.label_169));
			put("170", context.getString(R.string.label_170));
			put("171", context.getString(R.string.label_171));
			put("172", context.getString(R.string.label_172));
			put("173", context.getString(R.string.label_173));
			put("174", context.getString(R.string.label_174));
			put("175", context.getString(R.string.label_175));
			put("176", context.getString(R.string.label_176));
			put("177", context.getString(R.string.label_177));
			put("178", context.getString(R.string.label_178));
			put("179", context.getString(R.string.label_179));
			put("180", context.getString(R.string.label_180));
			put("181", context.getString(R.string.label_181));
			put("182", context.getString(R.string.label_182));
			put("183", context.getString(R.string.label_183));
			put("184", context.getString(R.string.label_184));
			put("185", context.getString(R.string.label_185));
			put("186", context.getString(R.string.label_186));
			put("187", context.getString(R.string.label_187));
			put("188", context.getString(R.string.label_188));
			put("189", context.getString(R.string.label_189));
			put("190", context.getString(R.string.label_190));
			put("191", context.getString(R.string.label_191));
			put("192", context.getString(R.string.label_192));
			put("193", context.getString(R.string.label_193));
			put("194", context.getString(R.string.label_194));
			put("195", context.getString(R.string.label_195));
			put("196", context.getString(R.string.label_196));
			put("197", context.getString(R.string.label_197));
			put("199", context.getString(R.string.label_199));
			put("201", context.getString(R.string.label_201));
			put("202", context.getString(R.string.label_202));
			put("203", context.getString(R.string.label_203));
			put("204", context.getString(R.string.label_204));
			put("205", context.getString(R.string.label_205));
			put("206", context.getString(R.string.label_206));
			put("207", context.getString(R.string.label_207));
			put("208", context.getString(R.string.label_208));
			put("209", context.getString(R.string.label_209));
			put("210", context.getString(R.string.label_210));
			put("211", context.getString(R.string.label_211));
			put("212", context.getString(R.string.label_212));
			put("213", context.getString(R.string.label_213));
			put("214", context.getString(R.string.label_214));
			put("215", context.getString(R.string.label_215));
			put("216", context.getString(R.string.label_216));
			put("217", context.getString(R.string.label_217));
			put("218", context.getString(R.string.label_218));
			put("219", context.getString(R.string.label_219));
			put("220", context.getString(R.string.label_220));
			put("221", context.getString(R.string.label_221));
			put("222", context.getString(R.string.label_222));
			put("223", context.getString(R.string.label_223));
			put("224", context.getString(R.string.label_224));
			put("225", context.getString(R.string.label_225));
			put("226", context.getString(R.string.label_226));
			put("227", context.getString(R.string.label_227));
			put("228", context.getString(R.string.label_228));
			put("229", context.getString(R.string.label_229));
			put("230", context.getString(R.string.label_230));
			put("231", context.getString(R.string.label_231));
			put("232", context.getString(R.string.label_232));
			put("233", context.getString(R.string.label_233));
			put("234", context.getString(R.string.label_234));
			put("235", context.getString(R.string.label_235));
			put("236", context.getString(R.string.label_236));
			put("237", context.getString(R.string.label_237));
			put("238", context.getString(R.string.label_238));
			put("239", context.getString(R.string.label_239));
			put("240", context.getString(R.string.label_240));
			put("241", context.getString(R.string.label_241));
			put("242", context.getString(R.string.label_242));
			put("243", context.getString(R.string.label_243));
			put("244", context.getString(R.string.label_244));
			put("245", context.getString(R.string.label_245));
			put("246", context.getString(R.string.label_246));
			put("247", context.getString(R.string.label_247));
			put("248", context.getString(R.string.label_248));
			put("249", context.getString(R.string.label_249));
			put("250", context.getString(R.string.label_250));
			put("251", context.getString(R.string.label_251));
			put("252", context.getString(R.string.label_252));
			put("253", context.getString(R.string.label_253));
			put("254", context.getString(R.string.label_254));
			put("255", context.getString(R.string.label_255));
			put("256", context.getString(R.string.label_256));
			put("257", context.getString(R.string.label_257));
			put("258", context.getString(R.string.label_258));
			put("259", context.getString(R.string.label_259));
			put("260", context.getString(R.string.label_260));
			put("261", context.getString(R.string.label_261));
			put("262", context.getString(R.string.label_262));
			put("263", context.getString(R.string.label_263));
			put("265", context.getString(R.string.label_265));
			put("266", context.getString(R.string.label_266));
			put("267", context.getString(R.string.label_267));
			put("268", context.getString(R.string.label_268));
			put("269", context.getString(R.string.label_269));
			put("270", context.getString(R.string.label_270));
			put("271", context.getString(R.string.label_271));
			put("272", context.getString(R.string.label_272));
			put("273", context.getString(R.string.label_273));
			put("274", context.getString(R.string.label_274));
			put("275", context.getString(R.string.label_275));
			put("276", context.getString(R.string.label_276));
			put("277", context.getString(R.string.label_277));
			put("278", context.getString(R.string.label_278));
			put("279", context.getString(R.string.label_279));
			put("280", context.getString(R.string.label_280));
			put("281", context.getString(R.string.label_281));
			put("282", context.getString(R.string.label_282));
			put("283", context.getString(R.string.label_283));
			put("284", context.getString(R.string.label_284));
			put("285", context.getString(R.string.label_285));
			put("286", context.getString(R.string.label_286));
			put("287", context.getString(R.string.label_287));
			put("288", context.getString(R.string.label_288));
			put("289", context.getString(R.string.label_289));
			put("290", context.getString(R.string.label_290));
			put("291", context.getString(R.string.label_291));
			put("292", context.getString(R.string.label_292));
			put("293", context.getString(R.string.label_293));
			put("294", context.getString(R.string.label_294));
			put("295", context.getString(R.string.label_295));
			put("296", context.getString(R.string.label_296));
			put("297", context.getString(R.string.label_297));
			put("298", context.getString(R.string.label_298));
			put("299", context.getString(R.string.label_299));
			put("300", context.getString(R.string.label_300));
			put("301", context.getString(R.string.label_301));
			put("302", context.getString(R.string.label_302));
			put("303", context.getString(R.string.label_303));
			put("304", context.getString(R.string.label_304));
			put("305", context.getString(R.string.label_305));
			put("306", context.getString(R.string.label_306));
			put("307", context.getString(R.string.label_307));
			put("308", context.getString(R.string.label_308));
			put("309", context.getString(R.string.label_309));
			put("310", context.getString(R.string.label_310));
			put("311", context.getString(R.string.label_311));
			put("312", context.getString(R.string.label_312));
			put("313", context.getString(R.string.label_313));
			put("314", context.getString(R.string.label_314));
			put("315", context.getString(R.string.label_315));
			put("316", context.getString(R.string.label_316));
			put("317", context.getString(R.string.label_317));
			put("318", context.getString(R.string.label_318));
			put("319", context.getString(R.string.label_319));
			put("320", context.getString(R.string.label_320));
			put("321", context.getString(R.string.label_321));
			put("322", context.getString(R.string.label_322));
			put("323", context.getString(R.string.label_323));
			put("324", context.getString(R.string.label_324));
			put("327", context.getString(R.string.label_327));
			put("328", context.getString(R.string.label_328));
			put("329", context.getString(R.string.label_329));
			put("330", context.getString(R.string.label_330));
			put("331", context.getString(R.string.label_331));
			put("332", context.getString(R.string.label_332));
			put("333", context.getString(R.string.label_333));
			put("335", context.getString(R.string.label_335));
			put("336", context.getString(R.string.label_336));
			put("337", context.getString(R.string.label_337));
			put("338", context.getString(R.string.label_338));
			put("339", context.getString(R.string.label_339));
			put("340", context.getString(R.string.label_340));
			put("341", context.getString(R.string.label_341));
			put("342", context.getString(R.string.label_342));
			put("343", context.getString(R.string.label_343));
			put("344", context.getString(R.string.label_344));
			put("345", context.getString(R.string.label_345));
			put("346", context.getString(R.string.label_346));
			put("347", context.getString(R.string.label_347));
			put("348", context.getString(R.string.label_348));
			put("349", context.getString(R.string.label_349));
			put("350", context.getString(R.string.label_350));
			put("351", context.getString(R.string.label_351));
			put("352", context.getString(R.string.label_352));
			put("353", context.getString(R.string.label_353));
			put("354", context.getString(R.string.label_354));
			put("355", context.getString(R.string.label_355));
			put("356", context.getString(R.string.label_356));
			put("357", context.getString(R.string.label_357));
			put("358", context.getString(R.string.label_358));
			put("359", context.getString(R.string.label_359));
			put("360", context.getString(R.string.label_360));
			put("361", context.getString(R.string.label_361));
			put("362", context.getString(R.string.label_362));
			put("363", context.getString(R.string.label_363));
			put("364", context.getString(R.string.label_364));
			put("365", context.getString(R.string.label_365));
			put("366", context.getString(R.string.label_366));
			put("367", context.getString(R.string.label_367));
			put("368", context.getString(R.string.label_368));
			put("369", context.getString(R.string.label_369));
			put("370", context.getString(R.string.label_370));
			put("371", context.getString(R.string.label_371));
			put("372", context.getString(R.string.label_372));
			put("373", context.getString(R.string.label_373));
			put("374", context.getString(R.string.label_374));
			put("375", context.getString(R.string.label_375));
			put("376", context.getString(R.string.label_376));
			put("377", context.getString(R.string.label_377));
			put("378", context.getString(R.string.label_378));
			put("379", context.getString(R.string.label_379));
			put("380", context.getString(R.string.label_380));
			put("382", context.getString(R.string.label_382));
			put("383", context.getString(R.string.label_383));
			put("384", context.getString(R.string.label_384));
			put("385", context.getString(R.string.label_385));
			put("386", context.getString(R.string.label_386));
			put("387", context.getString(R.string.label_387));
			put("388", context.getString(R.string.label_388));
			put("389", context.getString(R.string.label_389));
			put("390", context.getString(R.string.label_390));
			put("391", context.getString(R.string.label_391));
			put("392", context.getString(R.string.label_392));
			put("393", context.getString(R.string.label_393));
			put("394", context.getString(R.string.label_394));
			put("395", context.getString(R.string.label_395));
			put("397", context.getString(R.string.label_397));
			put("398", context.getString(R.string.label_398));
			put("399", context.getString(R.string.label_399));
			put("400", context.getString(R.string.label_400));
			put("401", context.getString(R.string.label_401));
			put("402", context.getString(R.string.label_402));
			put("403", context.getString(R.string.label_403));
			put("404", context.getString(R.string.label_404));
			put("405", context.getString(R.string.label_405));
			put("406", context.getString(R.string.label_406));
			put("407", context.getString(R.string.label_407));
			put("408", context.getString(R.string.label_408));
			put("409", context.getString(R.string.label_409));
			put("410", context.getString(R.string.label_410));
			put("411", context.getString(R.string.label_411));
			put("412", context.getString(R.string.label_412));
			put("413", context.getString(R.string.label_413));
			put("414", context.getString(R.string.label_414));
			put("415", context.getString(R.string.label_415));
			put("416", context.getString(R.string.label_416));
			put("417", context.getString(R.string.label_417));
			put("419", context.getString(R.string.label_419));
			put("420", context.getString(R.string.label_420));
			put("421", context.getString(R.string.label_421));
			put("422", context.getString(R.string.label_422));
			put("423", context.getString(R.string.label_423));
			put("424", context.getString(R.string.label_424));
			put("425", context.getString(R.string.label_425));
			put("426", context.getString(R.string.label_426));
			put("427", context.getString(R.string.label_427));
			put("428", context.getString(R.string.label_428));
			put("429", context.getString(R.string.label_429));
			put("430", context.getString(R.string.label_430));
			put("431", context.getString(R.string.label_431));
			put("432", context.getString(R.string.label_432));
			put("433", context.getString(R.string.label_433));
			put("434", context.getString(R.string.label_434));
			put("435", context.getString(R.string.label_435));
			put("436", context.getString(R.string.label_436));
			put("437", context.getString(R.string.label_437));
			put("438", context.getString(R.string.label_438));
			put("439", context.getString(R.string.label_439));
			put("440", context.getString(R.string.label_440));
			put("441", context.getString(R.string.label_441));
			put("442", context.getString(R.string.label_442));
			put("443", context.getString(R.string.label_443));
			put("445", context.getString(R.string.label_445));
			put("446", context.getString(R.string.label_446));
		}};
	}


	public HashMap<String, String> getMapping() {
		return mapping;
	}

	/**
	 * Map a label ID to a translated name.
	 */
	public @Nullable String mapIdToName(@NonNull String key) {
		return this.mapping.get(key);
	}
}
