<Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Script file="localisation.lua"/>
	<Script file="globals.lua"/>
	<Script file="CooldownBars.lua"/>
	<Frame name="CooldownTemplate" virtual="true" hidden="true" enableMouse="false">
		<Size>
			<AbsDimension x="230" y="20"/>
		</Size>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Addons\CooldownBars\textures\CC-Bar-Border" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Frames>
			<StatusBar name="$parentBar" inherits="TextStatusBar">
				<Size>
					<AbsDimension x="220" y="10"/>
				</Size>
				<Anchors>
					<Anchor point="TOP" relativePoint="TOP">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<BarTexture file="Interface\TargetingFrame\UI-TargetingFrame-BarFill"/>
				<BarColor r="0" g="0.8" b="0"/>
				<Layers>
					<Layer level="OVERLAY">
						<Fontstring name="$parentLeftText" inherits="SubSpellFont" text="Error!">
							<Anchors>
								<Anchor point="LEFT" relativePoint="LEFT">
									<Offset>
										<AbsDimension x="5" y="1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</Fontstring>
						<Fontstring name="$parentRightText" inherits="SubSpellFont" text="Error!">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="-5" y="1"/>
									</Offset>
								</Anchor>
							</Anchors>
						</Fontstring>
					</Layer>
				</Layers>
				<Scripts>
					<OnMouseDown>
					</OnMouseDown>
					<OnMouseUp>
						CooldownBars_OnClick(arg1, this:GetName());
					</OnMouseUp>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</StatusBar>
			<StatusBar name="$parentBGBar" inherits="TextStatusBar">
				<Size>
					<AbsDimension x="200" y="10"/>
				</Size>
				<Anchors>
					<Anchor point="TOP" relativePoint="TOP" relativeTo="$parentBar">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<BarTexture file="Interface\TargetingFrame\UI-TargetingFrame-BarFill"/>
				<BarColor r="0" g="0.8" b="0" a="0.25"/>
			</StatusBar>
			<Frame name="$parentPopup" toplevel="true" frameStrata="DIALOG" enableMouse="true" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT"/>
				</Anchors>
				<Size>
					<AbsDimension x="160" y="68"/>
				</Size>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
				</Backdrop>
				<Frames>
					<Button name="$parentButton1" text="Remove">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="$parent">
								<Offset>
									<AbsDimension x="5" y="-5"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
						<NormalText inherits="GameFontNormal"/>
						<HighlightText inherits="GameFontHighlight"/>
						<DisabledText inherits="GameFontDisable"/>
						<Scripts>
							<OnClick>
								CooldownBars_OnClick(arg1, this:GetName());
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentButton2" id="2" text="Don't track this">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentButton1" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-5"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
						<NormalText inherits="GameFontNormal"/>
						<HighlightText inherits="GameFontHighlight"/>
						<DisabledText inherits="GameFontDisable"/>
						<Scripts>
							<OnClick>
								CooldownBars_OnClick(arg1, this:GetName());
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentButton3" id="3" text="Cancel">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentButton2" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="-5"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="150" y="16"/>
						</Size>
						<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
						<NormalText inherits="GameFontNormal"/>
						<HighlightText inherits="GameFontHighlight"/>
						<DisabledText inherits="GameFontDisable"/>
						<Scripts>
							<OnClick>
								CooldownBars_OnClick(arg1, this:GetName());
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
				<Scripts>
					<OnUpdate>
						CDBPopup_OnUpdate();
					</OnUpdate>
				</Scripts>
			</Frame>
		</Frames>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentIcon" hidden="true">
					<Size>
						<AbsDimension x="10" y="10"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativePoint="LEFT">
							<Offset>
								<AbsDimension x="5" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				this.item = false;
				this.channeling = false;
				this.fadeOut = false;
				this.startTime = 0;
				this.endTime = 0;
				this.duration = 0;
			</OnLoad>
			<OnUpdate>
				CooldownBars_OnUpdate( this:GetID() );
			</OnUpdate>
		</Scripts>
	</Frame>
	<Frame name="CooldownFrame" hidden="true" parent="UIParent" movable="true">
		<Size>
			<AbsDimension x="32" y="32"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER" relativePoint="CENTER">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Scripts>
			<OnLoad>
				CooldownBars_OnLoad();
			</OnLoad>
			<OnEvent>
				CooldownBars_OnEvent(event);
			</OnEvent>
			<OnDragStart>
				this:StartMoving();
			</OnDragStart>
			<OnDragStop>
				this:StopMovingOrSizing();
			</OnDragStop>
		</Scripts>
	</Frame>
	<Frame name="CooldownBar1" inherits="CooldownTemplate" id="1" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="CooldownFrame">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar2" inherits="CooldownTemplate" id="2" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="CooldownBar1">
				<Offset>
					<AbsDimension x="5" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar3" inherits="CooldownTemplate" id="3" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="CooldownBar1">
				<Offset>
					<AbsDimension x="0" y="-5"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar4" inherits="CooldownTemplate" id="4" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="CooldownBar3">
				<Offset>
					<AbsDimension x="5" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar5" inherits="CooldownTemplate" id="5" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="CooldownBar3">
				<Offset>
					<AbsDimension x="0" y="-5"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar6" inherits="CooldownTemplate" id="6" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="CooldownBar5">
				<Offset>
					<AbsDimension x="5" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar7" inherits="CooldownTemplate" id="7" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="CooldownBar5">
				<Offset>
					<AbsDimension x="0" y="-5"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar8" inherits="CooldownTemplate" id="8" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="CooldownBar7">
				<Offset>
					<AbsDimension x="5" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar9" inherits="CooldownTemplate" id="9" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="CooldownBar7">
				<Offset>
					<AbsDimension x="0" y="-5"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar10" inherits="CooldownTemplate" id="10" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="CooldownBar9">
				<Offset>
					<AbsDimension x="5" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar11" inherits="CooldownTemplate" id="11" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="CooldownBar9">
				<Offset>
					<AbsDimension x="0" y="-5"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownBar12" inherits="CooldownTemplate" id="12" parent="UIParent">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="CooldownBar11">
				<Offset>
					<AbsDimension x="5" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	<Frame name="CooldownAlert" hidden="true" movable="true">
		<Size>
			<AbsDimension x="1200" y="32"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER" relativePoint="CENTER">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Frames>
			<Frame name="$parentLabel1">
				<Size>
					<AbsDimension x="1200" y="32"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativePoint="CENTER">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer>
						<FontString name="$parentText" inherits="ZoneTextFont" setAllPoints="true" font="Fonts\FRIZQT__.TTF" text="&lt;Your Skill&gt; is ready!">
							<FontHeight>
								<AbsValue val="15"/>
							</FontHeight>
						</FontString>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				this.state = 0;
				this.holdtime = 0;
				this.locked = true;
				CooldownAlert_OnLoad();
			</OnLoad>
			<OnUpdate>
				CooldownAlert_OnUpdate();
			</OnUpdate>
			<OnDragStart>
				if ( not this.locked ) then
					this:StartMoving();
				end
			</OnDragStart>
			<OnDragStop>
				this:StopMovingOrSizing();
			</OnDragStop>
		</Scripts>
	</Frame>
	<Button name="CDB_IconFrame" toplevel="true" frameStrata="LOW" parent="Minimap" enableMouse="true" movable="true" hidden="true">
		<Size>
			<AbsDimension x="33" y="33"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="-15" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="CDB_IconFrame_Icon" file="interface\icons\inv_misc_gem_diamond_04">
					<Size>
						<AbsDimension x="21" y="21"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="7" y="-6"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0.075" right="0.925" top="0.075" bottom="0.925"/>
				</Texture>
			</Layer>
		<Layer level="OVERLAY">
			<Texture file="Interface\Minimap\MiniMap-TrackingBorder">
				<Size>
					<AbsDimension x="56" y="56"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT"/>
				</Anchors>
			</Texture>
		</Layer>
		</Layers>
		<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
		<Scripts>
			<OnLoad>
				this.update = 1
				this:RegisterForClicks("LeftButtonUp","RightButtonUp")
				this:RegisterForDrag("LeftButton")
			</OnLoad>
			<OnEnter>
				CDB_OnTooltip("CooldownBars",CDB_MINIMAP_TOOLTIP)
			</OnEnter>
			<OnMouseDown>
				CDB_IconFrame_Icon:SetTexCoord(0,1,0,1)
			</OnMouseDown>
			<OnMouseUp>
				CDB_IconFrame_Icon:SetTexCoord(.075,.925,.075,.925)
			</OnMouseUp>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
			<OnDragStart>
				this:LockHighlight()
				cdb_dragging = true
			</OnDragStart>
			<OnUpdate>
				CDB_IconDraggingFrame_OnUpdate()
			</OnUpdate>
			<OnDragStop>
				this:UnlockHighlight()
				CDB_IconFrame_Icon:SetTexCoord(.075,.925,.075,.925)
				cdb_dragging = false
			</OnDragStop>
			<OnClick>
				CDB_IconFrame_OnClick(arg1)
				CDB_IconFrame_Icon:SetTexCoord(.075,.925,.075,.925)
			</OnClick>
		</Scripts>
	</Button>
	<GameTooltip name="CDBTooltip" inherits="GameTooltipTemplate" hidden="true">
		<Scripts>
			<Onload>
       			this:SetOwner(CooldownFrame, "ANCHOR_NONE");
     		</Onload>
		</Scripts>
	</GameTooltip>
</Ui>
