<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/ ..\FrameXML\UI.xsd">
	<!-- These are buttons to allow a visual way of changing settings within the enchantment window itself -->
	<Button name="SortEnchant_EnableButton" parent="CraftFrame">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		<Anchors>
			<Anchor point="RIGHT" relativeTo="CraftCreateButton" relativePoint="LEFT">
				<Offset>
					<AbsDimension x="-145" y="2"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				SortEnchant_HandleButtons.Enable();
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(SortEnchant_EnableOptions[SortEnchant_Master.Enabled]);
				GameTooltip:AppendText("\n|c00FFFFFF" .. SortEnchant_EnableLine .. "|n");
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\Icons\INV_Enchant_EssenceMagicLarge"/>
		<PushedTexture file="Interface\Icons\INV_Enchant_EssenceEternalLarge"/>
		<DisabledTexture file="Interface\Icons\INV_Enchant_EssenceNetherSmall"/>
		<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
	</Button>

	<Button name="SortEnchant_TypeButton" parent="CraftFrame">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		<Anchors>
			<Anchor point="LEFT" relativeTo="SortEnchant_EnableButton" relativePoint="RIGHT">
				<Offset>
					<AbsDimension x="2" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				SortEnchant_HandleButtons.Type();
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(SortEnchant_PreType .. SortEnchant_Master.Type .. SortEnchant_PostType);
				GameTooltip:AppendText("\n|c00FFFFFF" .. SortEnchant_TypeLine .. "|n");
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\Icons\INV_Chest_Chain_17"/>
		<PushedTexture file="Interface\Icons\INV_Chest_Chain_16"/>
		<DisabledTexture file="Interface\Icons\INV_Enchant_EssenceNetherSmall"/>
		<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
	</Button>

	<Button name="SortEnchant_GreyButton" parent="CraftFrame">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		<Anchors>
			<Anchor point="LEFT" relativeTo="SortEnchant_TypeButton" relativePoint="RIGHT">
				<Offset>
					<AbsDimension x="2" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				SortEnchant_HandleButtons.Grey();
			</OnClick>
			<OnEnter>
				GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT");
				GameTooltip:SetText(SortEnchant_GreyOptions[SortEnchant_Master.Grey]);
				GameTooltip:AppendText("\n|c00FFFFFF" .. SortEnchant_GreyLine .. "|n");
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\Icons\INV_Enchant_ShardGlimmeringLarge"/>
		<PushedTexture file="Interface\Icons\INV_Enchant_ShardGlowingLarge"/>
		<DisabledTexture file="Interface\Icons\INV_Enchant_EssenceNetherSmall"/>
		<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
	</Button>
	
	<!-- These are the dropdowns for the Enchantment window -->
	<Frame name="SortEnchant_ArmorDropDown" inherits="UIDropDownMenuTemplate" parent="CraftFrame" id="2">
		<Anchors>
			<Anchor point="TOPRIGHT">
				<Offset>
					<AbsDimension x="-25" y="-66"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				SortEnchant_ArmorDropDown_OnLoad();
			</OnLoad>
			<OnShow>
				SortEnchant_ArmorDropDown_OnShow();
			</OnShow>
		</Scripts>
	</Frame>
	<Frame name="SortEnchant_TypeDropDown" inherits="UIDropDownMenuTemplate" parent="CraftFrame" id="1">
		<Anchors>
			<Anchor point="RIGHT" relativeTo="SortEnchant_ArmorDropDown" relativePoint="LEFT">
				<Offset>
					<AbsDimension x="35" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				SortEnchant_TypeDropDown_OnLoad();
			</OnLoad>
			<OnShow>
				SortEnchant_TypeDropDown_OnShow();
			</OnShow>
		</Scripts>
	</Frame>
</Ui>