/**
* Takes params and returns the emoji for a particular incident
* @param {string} incident string
* @param {string} source number from 1-5
*/
export function getIncidentEmoji(incident:any, source:any, cl:boolean=false):any{
switch(source){
case '1':
// console.log(incident, source)
let class1: { [key: string]: string } = {
"C1083":"๐ซ๐",
"FIRE":"๐ฅ",
"HAZMAT":"โฃ๏ธ",
"1049A":"๐บ๐๐",
"1085B":"๐๐ง",
"TESTF":"๐งโ๐โ
",
"1057S": "๐ซโฐ",
"1053":"๐๐",
"1053A":"๐๐๐ค",
"1059": "๐คผ",
"1090": "๐คจ๐ง",
"1089": "๐",
"1042": "๐ถโโ๏ธ๐ซ",
"1057A": "โฐ",
"1085A": "๐",
"1085": "๐",
"1049": "๐บ๐",
"1061": "๐",
"1088":"๐
",
"1060":"๐",
"1060A":"๐",
"1083A":"๐ซ๐",
"1057":"โฐ",
"1088A":"๐
",
};
let class2: { [key: string]: string } = {
"C1044":"๐",
"C1041":"๐๐ง",
"1066": "๐ข๐ฐ",
"1066B": "๐ข๐ฐ",
"1068": "๐๐",
"1094": "๐",
"1094A": "๐",
"1023": "๐โโ๏ธ๐จ๐",
"1041": "๐๐ง",
"1044": "๐",
"1056": "๐",
"1055": "๐ฐ๐โโ๏ธ",
"1055A": "๐ฐ๐โโ๏ธโ",
"1068A": "๐๐โ",
"1044A": "๐โ",
"1093": "๐ฅ"
};
let class3: { [key: string]: string } = {
"1065": 'โ๐',
"1063": '๐ถ๐งณ',
"1072": '๐จ',
"1051": '๐ช๐ฐ',
'1067': '๐ก๐ถโโ๏ธ',
'1067A': '๐ก๐ถโโ๏ธ',
"1067B":'๐ข๐ฐ',
"1091": "๐",
"1066A": "๐ข๐ฐโ",
"1051A": "๐ช๐ฐโ",
};
let class4: { [key: string]: string } = {
"1081": '๐ซ',
"1080": '๐ช',
'1052': '๐ช๐ฐ',
"1064": '๐',
"1099": '๐ฃ',
"1040": '๐๐ช',
"1064A": '๐โ',
"1041A": '๐๐ง๐',
};
let class5: { [key: string]: string } = {
"1062": '๐ช๐',
"1079": '๐',
"1052A": '๐ช๐ฐโ',
"1081A": '๐ซโ',
"1080A": '๐ชโ',
};
if(incident in class1){
return class1[incident];
}else if(class2.hasOwnProperty(incident)){
return class2[incident];
}else if(incident in class3){
return class3[incident];
}else if(incident in class4){
return class4[incident];
}else if(incident in class5){
return class5[incident];
}else{
return 'โ';
}
case '2':
class1 = {
"DISTURBANCE IN PROGRESS":"๐",
"FORGERY/FRAUD":"๐คฅ",
"HIT AND RUN":"๐๐จ",
"HIT & RUN W/INJURY":"๐๐จ๐ค",
"HIT & RUN":"๐๐จ",
"SUSPICIOUS PERSON":"๐คจ๐งโโ๏ธ",
"DRUNK DRIVER":"๐บ๐",
"MISSING PERSON":"๐๐ง",
"FORGERY & FRAUD URGENT IN PROGRESS":"๐คฅโ",
};
class2 = {
"INDECENT EXPOSURE":"๐",
"PROWLER ON PREMISES":"๐",
"THEFT":"๐ฐ๐",
"ASSAULT":"๐",
"BURGLARY/VEHICLE":"๐๐",
"DRUNK DRIVER IN PROGRESS":"๐บ๐โ",
"STOLEN VEHICLE":"๐",
"STOLEN VEHICLE IN PROGRESS":"๐โ",
"ASSAULT WHEN MEDICAL ATTENTION REQUIRED":"๐๐",
"BURGLARY BUSINESS":"๐ข๐ฐ",
"BURGLARY BUSINESS ATTEMPT ONLY":"๐ข๐ฐ",
"BURGLARY RESIDENCE ATTEMPTED":"๐ก",
"THEFT IN PROGRESS":"๐ฐ๐โโ๏ธโ",
}
class3 = {
"BURGLARY BUSINESS IN PROGRESS":"๐ข๐ฐโ",
"BURGLARY RESIDENCE":"๐ก๐ถโโ๏ธ"
}
class4 = {
"BURGLARY RESIDENCE IN PROGRESS":"๐ก๐ถโโ๏ธโ",
"SHOOTING SCRAPE":"๐ซ",
"SHOOTING":"๐ซ",
"RAPE":"๐"
}
class5 = {
"SHOOTING SCRAPE IN PROGRESS/SUSPECT ON SCENE":"๐ซโ",
"CUTTING SCRAPE IN PROGRESS/SUSPECT ON SCENE":"๐ชโ",
"MURDER":"๐ช๐",
"MURDER IN PROGRESS":"๐ช๐โ",
"MURDER ATTEMPTED":"๐ช๐๐ซ"
}
if(incident in class1){
return class1[incident]
}else if(incident in class2){
return class2[incident]
}else if(incident in class3){
return class3[incident]
}else if(incident in class4){
return class4[incident]
}else if(incident in class5){
return class5[incident]
}else{
return 'โ๐ฎโโ๏ธ'
}
case '3':
return '๐'
case '4':
return '๐ถ'
case '5':
return '๐ค'
case '6':
let class0: { [key: string]: string } = {
"Firecrackers":"๐" ,
"Flooded road": "๐๐ฃ๏ธ",
"Fire event": "๐",
"School bus wreck":"๐๐",
"Fire": "๐ฅ",
"Welfare check":"โ
",
"Wreck with property damage":"๐ ๐ ๏ธ",
"Doe drill":"โก",
"Lines down":"๐ซ๐ก",
"Fire alarm":"๐ฅโฐ",
"Accident on waterway":"โต๐ฅ",
"Lost or found property":"๐",
"Emergency medical services":"โฑ๏ธ๐ฉบ",
"Motor vehicle accident":"๐๐ฅ",
"Noise disturbance":"๐",
"Private pull":"๐",
"Property check":"๐ ๐",
"Public drunk":"๐บ",
"Reposessed vehicle":"โ๏ธ๐",
"Standby":"๐ง",
"Phone report":"๐",
"Traffic problem":"๐๐ฆ",
"Tree down in road":"๐ณ๐ฃ๏ธ",
"Unwarranted call information":"๐๐ซ",
"User request for information":"๐๐",
"Want officer for investigation":"๐ต๏ธ",
"Wreck injury":"๐๐ฅ๐ค",
"Wreck property damage":"๐๐ฅ๐ ",
"Humane":"๐ถ",
"Injured person":"๐ค",
"Law enforcement requested":"๐ฎ",
"Location detail - only":"๐",
"Scan unit check":"๐",
"Be on lookout":"๐",
"Bolo":"๐",
"Pole down":"๐โฌ๏ธ",
"Mental transport":"๐ง ๐",
"Mental transport longhaul":"๐ง ๐",
"Pick up prisoner":"๐ฎ๐",
"Public assist":"๐ฅ",
"Unwarranted call utility":"๐๐ซ๐",
"Convey/escort":"๐๐ฅ",
"Injured person (child 5 years old or under)":"๐ถ๐ค",
"Traffic light out":"๐ซ๐ฆ",
"Haz mat":"โฃ๏ธ",
"Business check":"๐ข๐",
"Vandalism progress":"๐ข๐๏ธ๐",
"Warrant service":"๐",
"Disturbance":"๐",
"Alarm":"๐จ",
"Shoplifter":"๐๏ธ๐",
"Business hold up alarm":"๐ข๐จ",
"Unknown overdose":"๐โ",
"Vandalism":"๐ข๐๏ธ",
"Fight":"๐คผ",
}
class1 = {
"Disturbance in progress":"๐",
"Forgery/fraud":"๐คฅ",
"Hit and run":"๐๐จ",
"Hit & run w/injury":"๐๐จ๐ค",
"Hit & run":"๐๐จ",
"Suspicious person":"๐คจ๐งโโ๏ธ",
"Drunk driver":"๐บ๐",
"Missing person":"๐๐ง",
"Urgent forgery & fraud in progress":"๐คฅโ",
};
class2 = {
"Indecent exposure":"๐",
"Prowler on premises":"๐",
"Theft":"๐ฐ๐",
"Assault":"๐",
"Vehicle burglary":"๐๐",
"Drunk driver in progress":"๐บ๐โ",
"Stolen vehicle":"๐",
"Stolen vehicle in progress":"๐โ",
"Assault, medical attention required":"๐๐",
"Assault when medical attention required":"๐๐",
"Business burglary":"๐ข๐ฐ",
"Attempted business burglary":"๐ข๐ฐ",
"Attempted residence burglary in progress":"๐ก",
"Theft in progress":"๐ฐ๐โโ๏ธโ",
}
class3 = {
"Business burglary in progress":"๐ข๐ฐโ",
"Residence burglary":"๐ก๐ถโโ๏ธ"
}
class4 = {
"Residence burglary in progress":"๐ก๐ถโโ๏ธโ",
"Shooting scrape":"๐ซ",
"Shooting":"๐ซ",
"Rape":"๐"
}
class5 = {
"Shooting in progress":"๐ซโ",
"Stabbing in progress":"๐ชโ",
"Murder":"๐ช๐",
"Murder in progress":"๐ช๐โ",
"Murder attempted":"๐ช๐๐ซ"
}
if(incident in class0){
if(cl){return [class0[incident], 0]}
return class0[incident]
}else if(incident in class1){
if(cl){return [class1[incident], 1]}
return class1[incident]
}else if(incident in class2){
if(cl){return [class2[incident], 2]}
return class2[incident]
}else if(incident in class3){
if(cl){return [class3[incident], 3]}
return class3[incident]
}else if(incident in class4){
if(cl){return [class4[incident], 4]}
return class4[incident]
}else if(incident in class5){
if(cl){return [class5[incident], 5]}
return class5[incident]
}else{
if(cl){return ['โ๐ฎโโ๏ธ', 6]}
return 'โ๐ฎโโ๏ธ'
}
default:
return 'โ';
}
}