<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">

	<!-- ##################################################################################################################################### -->
	<!-- # CHAIN                                                                                                                             # -->
	<!-- ##################################################################################################################################### -->

	<!-- ===== Templates for the chain ======================================================================================================== -->

	<Frame name="CHH_ChainFrequencyTemplate" inherits="UIDropDownMenuTemplate" hidden="true" virtual="true" />

	<Frame name="CHH_ChainConditionTemplate" inherits="UIDropDownMenuTemplate" hidden="true" virtual="true" />

	<!-- ===== Frame containing all chain buttons ============================================================================================= -->

	<Frame name="CHH_ChainFrameTemplate" inherits="CHH_FrameBoxTemplate" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="10" y="-10"/>
				</Offset>
			</Anchor>
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
				<Offset>
					<AbsDimension x="-10" y="40"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName()..'TitleText'):SetText( CHHT_CHAINS_BUTTON_ASSIGNMENT );
				this:SetBackdropBorderColor(0.4, 0.4, 0.4);
				this:SetBackdropColor(0.15, 0.15, 0.15);
			</OnLoad>
		</Scripts>
		<Frames>
			<Frame name="$parentConditionLeftButton" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionLeftButton" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyLeftButton" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionMiddleButton" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionMiddleButton" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyMiddleButton" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionRightButton" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionRightButton" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyRightButton" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionButton4" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionButton4" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyButton4" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionButton5" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionButton5" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyButton5" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionShiftLeftButton" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionShiftLeftButton" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyShiftLeftButton" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionShiftMiddleButton" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionShiftMiddleButton" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyShiftMiddleButton" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionShiftRightButton" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionShiftRightButton" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyShiftRightButton" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionShiftButton4" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionShiftButton4" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyShiftButton4" inherits="CHH_ChainFrequencyTemplate" />

			<Frame name="$parentConditionShiftButton5" inherits="CHH_ChainConditionTemplate" />
                        <Frame name="$parentActionShiftButton5" inherits="CHH_MouseButtonDropDownTemplate" />
			<Frame name="$parentFrequencyShiftButton5" inherits="CHH_ChainFrequencyTemplate" />
		</Frames>
	</Frame>

	<!-- ##################################################################################################################################### -->
	<!-- # CHAIN TAB                                                                                                                         # -->
	<!-- ##################################################################################################################################### -->

	<Frame name="CHH_ChainTemplate" hidden="true" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
			<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" />
		</Anchors>
		<Frames>
			<Frame name="$parentAction" inherits="CHH_ChainFrameTemplate" hidden="true" />

			<Button name="$parentPage2Button" inherits="OptionsButtonTemplate" text="CHHT_CHAINS_CHAIN1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="20" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_ChainSpellAssign( 1 );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage3Button" inherits="OptionsButtonTemplate" text="CHHT_CHAINS_CHAIN2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage2Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_ChainSpellAssign( 2 );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage4Button" inherits="OptionsButtonTemplate" text="CHHT_CHAINS_CHAIN3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage3Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_ChainSpellAssign( 3 );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentPage5Button" inherits="OptionsButtonTemplate" text="CHHT_CHAINS_CHAIN4">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentPage4Button" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_ChainSpellAssign( 4 );
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentResetButton" inherits="OptionsButtonTemplate" text="CHHT_LABEL_DEFAULTS">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-20" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						CHH_ResetDefaults();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

</Ui>
