Macro.add('stat_clothes_icon',{
	handler  : function () {
		try {
			const wardrobe =State.variables.wardrobe; 
			const clothes = wardrobe.clothes;
			let output:string = '';

			if(!clothes.isValidItem){
				output = "<<imageWithTooltip 'system/icons/status/body_writing.png'>>You are not wearing clothes.<</imageWithTooltip>>";
				jQuery(this.output).wiki(output);
				return;
			}

			let image:string=clothes.icon;
			let msg:string = '';

			if(clothes.type == 'swimwear'){
				if(clothes.subtype == 'bikini')
					msg = `You are wearing a ${clothes.inhibitionString}${clothes.qualityString} quality bikini.`;
				else
					msg = `You are wearing a ${clothes.inhibitionString}${clothes.qualityString} quality swimsuit.`;

				msg += `<<image '${clothes.image}'>>`
				jQuery(this.output).wiki(`<<imageWithTooltip '${image}'>>${msg}<</imageWithTooltip>>`);
				return;
			}
			
			if(clothes.isMaidOutfit){
				msg = `You are wearing a ${clothes.inhibitionString}${clothes.qualityString} quality maid uniform.`;
			}

			else if(clothes.isSchoolOutfit){
				msg = `You are wearing a ${clothes.inhibitionString}${clothes.qualityString} quality school uniform.`;
			}

			else if(clothes.isSportsOutfit){
				msg = `You are wearing a ${clothes.inhibitionString}${clothes.qualityString} quality gym outfit.`;
			}

			else{
				msg = `You are wearing a ${clothes.inhibitionString}${clothes.qualityString} quality outfit.`;
			}

			if(wardrobe.isWearingShoes){
				msg += '<br/>You are wearing shoes.'
				msg += `<div class='outfitMiniPreview'><<image '${clothes.image}'>><<image '${wardrobe.shoes.image}'>></div>`
			}else{
				msg += '<br/>You are not wearing shoes.'
				msg += `<div class='outfitMiniPreview'><<image '${clothes.image}'>></div>`
			}

			jQuery(this.output).wiki(`<<imageWithTooltip '${image}'>>${msg}<</imageWithTooltip>>`);
			
		}
		catch (ex) {
			return this.error('ERROR in stat_clothes_icon-widget: ' + ex.message);
		}
	}
});

/*<<widget ''>>
	<<if !$clothes.isValidItem>>
		

			
		<<elseif $wardrobe.clothingworntype == 'gm_office'>>
			<<if $wardrobe.PCloStyle == 4 and $wardrobe.PCloBimbo == 1 and $cheatBimbo == 0>>
				
				msg = 'You`re wearing an office dress a bimbo or a prostitute would wear'
				
				image = 'office_pb'
			<<elseif $wardrobe.PCloStyle == 4 and ($wardrobe.PCloBimbo == 0 or getvar("$cheatBimbo") == 1)>>
				msg = 'You`re wearing an office dress a prostitute would wear.'
				
				image = 'office_p'
			<<elseif ($clothes.inhibition >= 40 or $wardrobe.PCloThinness == 6) and $wardrobe.PCloBimbo == 1 and $cheatBimbo == 0>>
				
				msg = 'You`re wearing an exhibitionist office dress a bimbo would wear'
				
				image = 'office_eb'
			<<elseif ($clothes.inhibition >= 40 or $wardrobe.PCloThinness == 6) and ($wardrobe.PCloBimbo == 0 or getvar("$cheatBimbo") == 1)>>
				msg = 'You are wearing an exhibitionist office dress.'
				
				image = 'office_e'
			<<elseif $wardrobe.PCloBimbo == 1 and $cheatBimbo == 0>>
				
				msg = 'You are wearing an office dress a bimbo would wear'
				
				image = 'office_b'
			<<elseif $clothes.inhibition >= 30>>
				msg = 'You`re wearing a very revealing office dress.'
				
				image = 'office_s'
			<<elseif $clothes.inhibition >= 25>>
				msg = 'You`re wearing a revealing office dress.'
				
				image = 'office_s'
			<<elseif $clothes.inhibition >= 20>>
				msg = 'You`re wearing a slightly revealing office dress.'
				
				image = 'office_s'
			<<else>>
				msg = 'You`re wearing a normal office dress.'
				
				image = 'office'
			<</if>>

		<<elseif $wardrobe.clothingworntype == 'misc_outfits' and $wardrobe.clothingwornnumber == '1'>>
			
			
			msg = 'You are wearing an old hessian sack the hunters gave you.'
			image = 'clothes'
		<<else>>
			<<if $wardrobe.PCloStyle == 4 and $wardrobe.PCloBimbo == 1 and $cheatBimbo == 0>>
				
				msg = 'You`re wearing an outfit a bimbo, prostitute would wear.'
				
				image = 'clothes_pb'
			<<elseif $wardrobe.PCloStyle == 4>>
				msg = 'You`re wearing an outfit a prostitute would wear.'
				
				image = 'clothes_p'
			<<elseif ($clothes.inhibition >= 40 or $wardrobe.PCloThinness == 6) and $wardrobe.PCloBimbo == 1 and $cheatBimbo == 0>>
				
				msg = 'You`re wearing exhibitionist clothes a bimbo would wear.'
				
				image = 'clothes_eb'
			<<elseif ($clothes.inhibition >= 40 or $wardrobe.PCloThinness == 6)>>
				msg = 'You are wearing exhibitionist clothes.'
				
				image = 'clothes_e'
			<<elseif $wardrobe.PCloBimbo == 1 and $cheatBimbo == 0>>
				
				msg = 'You are wearing bimbo clothes.'
				
				image = 'clothes_b'
			<<elseif $clothes.inhibition >= 30>>
				msg = 'You`re wearing very revealing clothes.'
				
				image = 'clothes_s'
			<<elseif $clothes.inhibition >= 25>>
				msg = 'You`re wearing revealing clothes.'
				
				image = 'clothes_s'
			<<elseif $clothes.inhibition >= 20>>
				msg = 'You`re wearing slightly revealing clothes.'
				
				image = 'clothes_s'
			<<else>>
				<<set _stat_clothes_msg = "You're wearing normal clothes.">>
				
				image = 'clothes'
			<</if>>
		<</if>>

		<<set _stat_clothes_msg = 'You are wearing a '+setup.func('itemDescriptionFunctions','qualityString',$wardrobe.outfitQuality)+' quality '>>
		<<switch $wardrobe.outfitIndecency>>
			<<case 0>>
				<<set _stat_clothes_msg += 'conservative '>>
			<<case 1>>
				<<set _stat_clothes_msg += 'attractive '>>
			<<case 2>>
				<<set _stat_clothes_msg += 'sexy '>>
			<<case 3>>
				<<set _stat_clothes_msg += 'slutty '>>
			<<case 4>>
				<<set _stat_clothes_msg += 'whorish '>>
		<</switch>>
		<<if $wardrobe.isSchoolOutfit>>
			<<set _stat_clothes_msg += 'school outfit.'>>
		<<elseif $wardrobe.isSportsOutfit>>
			<<set _stat_clothes_msg += 'gym outfit.'>>
			<<if $wardrobe.PShoHeels > 1>>
				<<set _stat_clothes_msg += " <<negative>>You can't do sports while wearing heels.<</negative>>">>
			<</if>>
		<<elseif $wardrobe.isMaidOutfit>>
			<<set _stat_clothes_msg += 'maid outfit.'>>
		<<elseif $wardrobe.clothes.type == 'swimwear'>>
			<<set _stat_clothes_msg += 'swimming outfit.'>>
		<<else>>
			<<set _stat_clothes_msg += 'outfit.'>>
		<</if>>

		<<if !$wardrobe.isWearingShoes>>
			<<set _stat_clothes_msg += " You are currently not wearing your shoes.">>
		<</if>>
		<<set _stat_clothes_msg += "<div class='outfitMiniPreview'><<image `$pc.bodyImage('clothes')`>><<image `$pc.bodyImage('shoes')`>></div>">>

		<<imageWithTooltip `'system/icons/status/'+_stat_clothes_icon+'.png'`>>
			_stat_clothes_msg
		<</imageWithTooltip>>
	<</if>>

<</widget>>*/