<ui>
	<block className="SmokeIndication">
		<bind name="dataRefDH" value="'playerEntity'; '$dataRef.ref'"/>
		<bind name="collectionDH" value="CC.camera; 'cameraCollection'"/>
		<bind name="entityDH" value="'cameraEntity'; cameraCollection[0].id"/>
		<bind name="watch" value="'player'; playerInCollection[0]"/>
		<bind name="watchDH" value="'relation'; 		['playerEntity.relation.evChanged']; playerEntity.relation.value"/>
		<bind name="watchDH" value="'isAlive'; 			['playerEntity.health.evKilled']; playerEntity.health.isAlive"/>
		<bind name="watchDH" value="'smokeIndication'; 		['playerEntity.smokeIndication.evSmokeTimerChanged']; playerEntity.smokeIndication"/>
		<bind name="watchDH" value="'camera'; 			['cameraEntity.camera.evAltVisionChanged','cameraEntity.camera.evTacticalStateChanged']; cameraEntity.camera"/>
		<bind name="controller" value="lesta.dialogs.controllers.CollectionController; 'players in battle'; 'name'; name; 'playerInCollection'"/>
		<bind name="collectionDH" value="CC.userPrefs; 'userPrefsCollection'"/>
        <bind name="entityDH" value="'userPrefsEntity'; userPrefsCollection[0].id"/>
		<bind name="watchDH" value="'userPrefs'; ['userPrefsEntity.userPrefs.evUserPrefsChanged']; userPrefsEntity.userPrefs.userPrefs"/>
		<bind name="draggable" value="'SIDragZone'; 'IMPosition'; 'SI'"/>
		<bind name="watch" value="'SIPositionX'; (userPrefs.IMPositionX.SI == null)  ? ((stageSize.x/2) - 300) : userPrefs.IMPositionX.SI"/>
        <bind name="watch" value="'SIPositionY'; (userPrefs.IMPositionY.SI == null)  ? ((stageSize.y/2) + 100) :  userPrefs.IMPositionY.SI"/>
        <bind name="left" value="SIPositionX"/>
        <bind name="top" value="SIPositionY"/>
		<block>				
			<block type="text">
				<bind name="visible" value="smokeIndication.smokeLastLifeTime &gt;0 &amp;&amp; isAlive"/>
				<style>
					<left value="0px"/>
					<top value="0px"/>
					<position value="absolute"/>
				</style>
				<bind name="scaleX" value="0.75"/>
				<bind name="scaleY" value="0.75"/>
				<bind name="style" value="'backgroundImage'; ('url:../modernization_icons/icon_modernization_PCM037_SmokeGenerator_Mod_I.png')"/>
			</block>
			<block type="text">
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="smokeIndication.smokeFirstLifeTime"/>           
				<style>
					<left value="65px"/>
					<top value="0px"/>
					<position value="absolute"/>
					<fontSize value="24"/>
					<textColor value="0xFF66FFC1"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="smokeIndication.smokeFirstLifeTime &gt;0 &amp;&amp; isAlive"/>
				<bind name="style" value="'textColor'; (smokeIndication.smokeFirstLifeTime &lt; '20') ? '0xFF0000':'0x66FFC1'"/> 
				<bind name="style" value="'fontSize'; (smokeIndication.smokeFirstLifeTime &lt; '20') ? '16':'24'"/> 
			</block>
			<block type="text">
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="smokeIndication.smokeLastLifeTime"/>           
				<style>
					<left value="95px"/>
					<top value="0px"/>
					<position value="absolute"/>
					<fontSize value="24"/>
					<textColor value="0xFF66FFC1"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="smokeIndication.smokeLastLifeTime &gt;0 &amp;&amp; isAlive"/>
				<bind name="style" value="'textColor'; (smokeIndication.smokeLastLifeTime &lt; '20') ? '0xFF0000':'0x66FFC1'"/> 
				<bind name="style" value="'fontSize'; (smokeIndication.smokeFirstLifeTime &lt; '20') ? '24':'16'"/> 
			</block>
			<params>
				<param name="name" value="SIDragZone"/>
			</params>
		</block>
	</block>	
    <block className="SmokeIndicator">	 
		<block>
			<bind name="collectionRepeatDH" value="CC.avatar; 'SmokeIndication'; 'team.ally.sortedAlive'; {}"/>
		</block>				
    </block>
</ui>