:: wardrobe_item_details[menu]
	<<set _item_id = $location_var[$here][0]>>
	<<set _itemData = $wardrobe.get(_item_id)>>
	<<debugVar _itemData>>

	<<set _wearable = $wardrobe.wearable(_item_id)>>

	<<image `$wardrobe.itemImage(_item_id)`>>

	<p>
		<<itemDescription _item_id>>
	</p>

	<<if _itemData.health == -2>>
		<!-- The concept of health doesn't apply to this item -->
	<<elseif _itemData.health == -1>>
		<p class="positive">It is made of extremely durable fabric. You could wear it for years without it tearing.</p>
	<<elseif _itemData.health == 0>>
		<p class="negative">This outfit is completely worn-out. You don't want to wear it.</p>
	<<elseif _itemData.health < 10>>
		<p class="negative">This outfit is nearly worn-out.You will soon need to replace or toss it.</p>
	<<elseif _itemData.health < 50>>
		<p>This outfit, while showing some slight signs or tear and wear, is still in a decent condition.</p>
	<<else>>
		<p>This outfit is in a good condition.</p>
	<</if>>

	<<switch $wardrobe.wearableBMI(_item_id)>>
		<<case -2>>
			<!-- The concept of BMI size doesn't apply to this item -->
		<<case -1>>
			<<positive>>This outfit suits any hip size.<</positive>>
		<<case 0>>
			<<negative>>This outfit is too tight for you to fit in.<</negative>>
		<<case 1>>
			<<negative>>This outfit is too lose for you to fit in.<</negative>>
		<<case 2>>
			<<negative>>This outfit is very tight around your hips. You should consider refitting it.<</negative>>
		<<case 3>>
			<<negative>>This outfit is very lose around your hips. You should consider refitting it.<</negative>>
		<<case 4>>
			<<positive>>This outfit fits you well.<</positive>>
	<</switch>>

	<<if $wardrobe.isWearing(_item_id)>>
		<p>
			You are wearing this item.
		</p>
		<p>
			<<act "Strip">>
				<<run $wardrobe.strip(_item_type)>>
				<<gt "wardrobe_item_details" _item_id>>
			<</act>>
		</p>
	<<else>>
		<p>
			<<if _wearable.total>>
				<<act "Wear">>
					<<run $wardrobe.wear(_item_id)>>
					<<gt "wardrobe_item_details" _item_id>>
				<</act>>
			<</if>>

			<<act "Place in Wardrobe">>
				<<run $wardrobe.sendToLocation(_item_id,0)>>
				<<gt "wardrobe_item_details" _item_id>>
			<</act>>
			<<act "Place in Storage">>
				<<run $wardrobe.sendToLocation(_item_id,1)>>
				<<gt "wardrobe_item_details" _item_id>>
			<</act>>
			<<act "Place in Unwanted-Pile">>
				<<run $wardrobe.sendToLocation(_item_id,2)>>
				<<gt "wardrobe_item_details" _item_id>>
			<</act>>
		</p>
	<</if>>
	<<act "Return to overview">>
		<<gt "wardrobe_type_overview" $wardrobeOverviewArgs[0] $wardrobeOverviewArgs[1]>>
	<</act>>
	<<act "Return to wardrobe">>
		<<gt "wardrobe">>
	<</act>>


	<<debug>>
		<<set _tempBMI = (_itemData.bmi ?? 0)>>
		BMI: <<numberbox "_tempBMI" _tempBMI>><br/>
		Health: <<numberbox "_tempHealth" _itemData.health>><br/>
		<<button 'Confirm'>>
			<<set _metaData = {bmi: _tempBMI, h: _tempHealth}>>
			<<run $wardrobe.setMetadata(_item_id,_metaData)>>
			<<gt 'wardrobe_item_details' _item_id>>
		<</button>>
	<</debug>>