<ui>
	<block className="Targets">
		<bind name="dataRefDH" value="'playerEntity'; '$dataRef.ref'"/>
		<bind name="collectionDH" value="CC.camera; 'cameraCollection'"/>
		<bind name="entityDH" value="'cameraEntity'; cameraCollection[0].id"/>
		<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="'flags'; 			['playerEntity.target.evChanged']; playerEntity.target.flags"/>
		<bind name="watchDH" value="'level'; 			[]; playerEntity.avatar.ship.ref.ship.levelRome"/>
		<bind name="watchDH" value="'shipCountry'; 		[]; playerEntity.avatar.ship.ref.ship.country"/>
		<bind name="watchDH" value="'nameUpper'; 		[]; playerEntity.avatar.ship.ref.ship.nameUpper"/>
		<bind name="watchDH" value="'name'; 			[]; playerEntity.avatar.name"/>
		<bind name="watchDH" value="'shipType'; 		[]; playerEntity.avatar.ship.ref.ship.subtype"/>
		<bind name="watchDH" value="'shipInfo'; 		[]; player.shipParams"/>
		<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="watch" value="'player'; playerInCollection[0]"/>
		<bind name="watch" value="'isSelf'; (relation == 0)"/>		
		<bind name="firstEntityDH" value="'timerEntity'; CC.timer"/>	
		<bind name="var" value="{wasVisible:false}"/>
		<bind name="watchDH" value="'isVisible'; ['playerEntity.visibility.evChanged']; playerEntity.visibility.mapVisible"/>
		<bind name="watchDH" value="'wasVisible'; ['playerEntity.visibility.evChanged']; playerEntity.visibility.mapVisible || wasVisible "/>
				
		<block>
			<block className="chat_background" type="native">
				<params>
					<param name="name" value="backgroundClip"/>
				</params>
				<style>
					<width value="120px"/>
					<height value="120px"/>
				</style>
			</block>
			<block type="text"> <!-- shipName -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="nameUpper"/>           
				<style>
					<textAlign value="right"/>
					<left value="70px"/>
					<top value="0px"/>
					<position value="absolute"/>
					<fontSize value="16"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="true"/>
			</block>
			<block type="text"> <!-- level -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="level"/>           
				<style>
					<left value="65px"/>
					<top value="20px"/>
					<position value="absolute"/>
					<fontSize value="16"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="true"/>
			</block>
			<block type="text"> <!-- shipClass -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="shipType=='Destroyer'? '7'
													:shipType=='Cruiser'? '6'
													:shipType=='Battleship'? '5'
													:'4'"/>				
				<bind name="style" value="'textColor'; '0xFFEEEEEE'"/>		
				<style>
					<position value="absolute"/>
					<left value="100px"/>
					<top value="20px"/>
					<width value="24"/>
					<height value="24"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
				</style>
			</block>
			
			<block type="text"> <!-- visibility icon -->
				<bind name="text" value="'X'"/>
				<styleClass value="$TextDefault"/>
				<bind name="class" value="$None"/>
				<style>
					<left value="10px"/>
					<top value="40px"/>
					<position value="absolute"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
					<marginTop value="-3px"/>
				</style>
				<bind name="visible" value="(shipInfo.visibilityDistByShip>0)"/>
			</block>
			<block type="text"> <!-- visibility -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="format(shipInfo.visibilityDistByShip, 1)"/>           
				<style>
					<left value="45px"/>
					<top value="40px"/>
					<position value="absolute"/>
					<fontSize value="14"/>
					<textColor value="0xFFEEEEEE"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="true"/>
			</block>
			
			<block type="text"> <!-- max_speed icon -->
				<bind name="text" value="'L'"/>
				<styleClass value="$TextDefault"/>
				<bind name="class" value="$None"/>
				<style>
					<left value="65px"/>
					<top value="40px"/>
					<position value="absolute"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
					<marginTop value="-3px"/>
				</style>
				<bind name="visible" value="(shipInfo.maxSpeed>0)"/>
			</block>
			<block type="text"> <!-- maxSpeed -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="format(shipInfo.maxSpeed, 1)"/>           
				<style>
					<left value="100px"/>
					<top value="40px"/>
					<position value="absolute"/>
					<fontSize value="14"/>
					<textColor value="0xFFEEEEEE"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="true"/>
			</block>
			
			<block type="text"> <!-- artillery icon -->
				<bind name="text" value="'F'"/>
				<styleClass value="$TextDefault"/>
				<bind name="class" value="$None"/>
				<style>
					<left value="10px"/>
					<top value="60px"/>
					<position value="absolute"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
					<marginTop value="-3px"/>
				</style>
				<bind name="visible" value="(shipInfo.artillery_guns_count>0)"/>
			</block>
			<block type="text"> <!-- artillery_max_dist -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="format(shipInfo.artillery_max_dist, 1)"/>           
				<style>
					<left value="45px"/>
					<top value="60px"/>
					<position value="absolute"/>
					<fontSize value="14"/>
					<textColor value="0xFFEEEEEE"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="(shipInfo.artillery_guns_count>0)"/>
			</block>
			
			<block type="text"> <!-- art.reload icon -->
				<bind name="text" value="'Q'"/>
				<styleClass value="$TextDefault"/>
				<bind name="class" value="$None"/>
				<style>
					<left value="65px"/>
					<top value="60px"/>
					<position value="absolute"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
					<marginTop value="-3px"/>
				</style>
				<bind name="visible" value="(shipInfo.artillery_guns_count>0)"/>
			</block>
			<block type="text"> <!-- artillery_time_reload -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="format(shipInfo.artillery_time_reload, 1)"/>           
				<style>
					<left value="100px"/>
					<top value="60px"/>
					<position value="absolute"/>
					<fontSize value="14"/>
					<textColor value="0xFFEEEEEE"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="(shipInfo.artillery_guns_count>0)"/>
			</block>
			
			<block type="text"> <!-- torpedoes icon -->
				<bind name="text" value="'J'"/>
				<styleClass value="$TextDefault"/>
				<bind name="class" value="$None"/>
				<style>
					<left value="10px"/>
					<top value="80px"/>
					<position value="absolute"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
					<marginTop value="-3px"/>
				</style>
				<bind name="visible" value="(shipInfo.torpedoes_guns_count>0)"/>
			</block>
			<block type="text"> <!-- torpedoes_max_dist -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="format(shipInfo.torpedoes_max_dist, 1)"/>           
				<style>
					<left value="45px"/>
					<top value="80px"/>
					<position value="absolute"/>
					<fontSize value="14"/>
					<textColor value="0xFFEEEEEE"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="(shipInfo.torpedoes_guns_count>0)"/>
			</block>
			
			<block type="text"> <!-- reload icon -->
				<bind name="text" value="'Q'"/>
				<styleClass value="$TextDefault"/>
				<bind name="class" value="$None"/>
				<style>
					<left value="65px"/>
					<top value="80px"/>
					<position value="absolute"/>
					<fontFamily value="$WoWsSymbol"/>
					<fontSize value="18"/>
					<marginTop value="-3px"/>
				</style>
				<bind name="visible" value="(shipInfo.torpedoes_guns_count>0)"/>
			</block>
			<block type="text"> <!-- torpedoes_reload -->
				<styleClass value="$TextDefault"/>
				<styleClass value="$MiddleAligned"/>			
				<bind name="text" value="format(shipInfo.torpedoes_time_reload, 1)"/>           
				<style>
					<left value="100px"/>
					<top value="80px"/>
					<position value="absolute"/>
					<fontSize value="14"/>
					<textColor value="0xFFEEEEEE"/>
					<fontFamily value="$WWSDefaultFontBold"/>
				</style>
				<bind name="visible" value="(shipInfo.torpedoes_guns_count>0)"/>
			</block>	
		</block>
		<bind name="visible" value="isVisible &amp;&amp; isAlive &amp;&amp; !(camera.isTactical) &amp;&amp; flags>0 &amp;&amp; flags!=2"/>
	</block>

    <block className="InfoPanel">
		<bind name="collectionRepeatDH" value="CC.avatar; 'Targets'; 'team.enemy.sortedAlive'; {}"/>
		<block>
		</block>
    </block>
</ui>