<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">

	<Script file="Bag.lua"/>
	
	<!-- A Bagnon bag template, based off the normal one but with no XML dependencies other than font -->
	<Button name="BagnonBagTemplate" virtual="true">
		<Size>
			<AbsDimension x="37" y="37"/>
		</Size>
		
		<Layers>
			<Layer level="BORDER">
				<Texture name="$parentIconTexture"/>
				<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
					<Anchors>
						<Anchor point="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-5" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentStock" inherits="NumberFontNormalYellow" justifyH="LEFT" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		
		<Frames>
			<Model name="$parentCooldown" file="Interface\Cooldown\UI-Cooldown-Indicator.mdx" scale="0.85" setAllPoints="true" hidden="true">
				<Scripts>
					<OnUpdateModel>
						CooldownFrame_OnUpdateModel();
					</OnUpdateModel>
					<OnAnimFinished>
						CooldownFrame_OnAnimFinished();
					</OnAnimFinished>
				</Scripts>
			</Model>
		</Frames>
		
		<NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot2">
			<Size>
				<AbsDimension x="64" y="64"/>
			</Size>
			<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="-1"/>
					</Offset>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
		<HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
		
		<Scripts>
			<OnLoad>
				BagnonBag_OnLoad();
			</OnLoad>
			<OnEvent>
				BagnonBag_OnEvent(event);
			</OnEvent>
			<OnEnter>
				BagnonBag_OnEnter();
			</OnEnter>
			<OnLeave>
				BagnonCore_UnhighlightAll(this:GetParent():GetParent());
				GameTooltip:Hide();
			</OnLeave>
			<OnClick>
				BagnonBag_OnClick();
			</OnClick>
			<OnDragStart>
				BagnonBag_OnDrag();
			</OnDragStart>
			<OnReceiveDrag>
				BagnonBag_OnClick();
			</OnReceiveDrag>
			<OnShow>
				BagnonBag_OnShow();
			</OnShow>
		</Scripts>
	</Button>
</Ui>
