<Ui>
	<StatusBar name="ConsolePortPowerLevel"
		minValue="0"
		maxValue="3"
		frameStrata="ARTWORK"
		parent="UIParent"
		enableMouse="true"
		movable="true"
		hidden="true">
		<Size x="102" y="12" />
		<Anchors>
			<Anchor relativeTo="UIParent" point="CENTER" y="20" x="-5" />
		</Anchors>
		<BarTexture parentKey="BarTexture" file="Interface\TargetingFrame\UI-StatusBar"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Background">
					<Size x="105" y="35" />
					<Anchors>
						<Anchor point="CENTER" x="2" y="0" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="1">
				<Texture parentKey="Icon">
					<Size x="25" y="25" />
					<Anchors>
						<Anchor point="RIGHT" relativeKey="$parent.BorderLeft" relativePoint="LEFT" x="-6"/>
					</Anchors>
				</Texture>
				<FontString parentKey="Text" inherits="GameFontHighlightSmallOutline" justifyH="CENTER">
					<Anchors>
						<Anchor point="CENTER" x="0" y="-14" />
					</Anchors>
				</FontString>
				<Texture parentKey="BorderLeft">
					<Size x="24" y="20"/>
					<Anchors>
						<Anchor point="LEFT" x="-5" />
					</Anchors>
				</Texture>
				<Texture parentKey="BorderRight">
					<Size x="24" y="20"/>
					<Anchors>
						<Anchor point="RIGHT" x="5" />
					</Anchors>
				</Texture>
				<Texture parentKey="BorderCenter">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.BorderLeft" relativePoint="TOPRIGHT" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent.BorderRight" relativePoint="BOTTOMLEFT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="2">
				<Texture parentKey="Tick1">
					<Size x="14" y="20"/>
					<Anchors>
						<Anchor point="CENTER" x="-17"/>
					</Anchors>
				</Texture>
				<Texture parentKey="Tick2">
					<Size x="14" y="20"/>
					<Anchors>
						<Anchor point="CENTER" x="17"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="2">
				<Texture parentKey="GlowLeft" alpha="0">
					<Size x="35" y="31"/>
					<Anchors>
						<Anchor point="LEFT" x="-11" />
					</Anchors>
				</Texture>
				<Texture parentKey="GlowRight" alpha="0">
					<Size x="35" y="31"/>
					<Anchors>
						<Anchor point="RIGHT" x="11" />
					</Anchors>
				</Texture>
				<Texture parentKey="GlowCenter" alpha="0">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.GlowLeft" relativePoint="TOPRIGHT" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent.GlowRight" relativePoint="BOTTOMLEFT" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Animations>
			<AnimationGroup parentKey="Critical" looping="REPEAT">
				<Alpha childKey="BarTexture" duration="0.25" order="1" fromAlpha="0" toAlpha="1" />
				<Alpha childKey="BarTexture" duration="0.25" order="2" fromAlpha="1" toAlpha="0" startDelay="0.25" />
				<Alpha childKey="GlowLeft" duration="0.25" order="1" fromAlpha="0" toAlpha="0.5" />
				<Alpha childKey="GlowLeft" duration="0.25" order="2" fromAlpha="0.5" toAlpha="0" startDelay="0.25" />
				<Alpha childKey="GlowRight" duration="0.25" order="1" fromAlpha="0" toAlpha="0.5" />
				<Alpha childKey="GlowRight" duration="0.25" order="2" fromAlpha="0.5" toAlpha="0" startDelay="0.25" />
				<Alpha childKey="GlowCenter" duration="0.25" order="1" fromAlpha="0" toAlpha="0.5" />
				<Alpha childKey="GlowCenter" duration="0.25" order="2" fromAlpha="0.5" toAlpha="0" startDelay="0.25" />
			</AnimationGroup>
			<AnimationGroup parentKey="Charging" looping="REPEAT">
				<Alpha childKey="BarTexture" duration="0.5" order="1" fromAlpha="0" toAlpha="1" />
				<Alpha childKey="BarTexture" duration="0.5" order="2" fromAlpha="1" toAlpha="0" startDelay="0.25" />
				<Scripts>
					<OnPlay>
						self.fillValue = 1;
						self:GetParent():SetValue(self.fillValue);
					</OnPlay>
					<OnLoop>
						local bar = self:GetParent();
						local min, max = bar:GetMinMaxValues();

						self.fillValue = (self.fillValue % (max + 1)) + 1;
						bar:SetValue(Clamp(self.fillValue, min + 1, max));
					</OnLoop>
				</Scripts>
			</AnimationGroup>
		</Animations>
	</StatusBar>
	<Script file="PowerLevel.lua" />
</Ui>