<?xml version="1.0"?>
<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">

	<Frame name="RSExplorerCustomLootTemplate" inherits="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="background" atlas="GarrLanding-MiddleTile">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER" textureSubLevel="3">
				<Texture parentKey="background2">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
					<Color r="0" g="0" b="0" a=".35" />
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame parentKey="ControlFrame" inherits="RSExplorerLootControlTemplate" >
				<Anchors>
					<Anchor point="TOPLEFT" y="-10" />
					<Anchor point="TOPRIGHT" />
				</Anchors>
			</Frame>
			<Frame parentKey="GroupList" inherits="RSExplorerLootGroupListTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.ControlFrame" relativePoint="BOTTOMLEFT"/>
					<Anchor point="BOTTOM" relativeKey="$parent" relativePoint="BOTTOM" />
				</Anchors>
			</Frame>
			<Frame parentKey="GroupInfo" inherits="RSExplorerGroupInfo">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.GroupList" relativePoint="TOPRIGHT" x="-25"/>
					<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" y="5" />
				</Anchors>
			</Frame>
		</Frames>
	</Frame>

	<Frame name="RSExplorerLootControlTemplate" virtual="true">
		<Size y="80" />
		<Layers>
			<Layer level="ARTWORK">
				<FontString parentKey="LootGroupLabel" inherits="GameFontHighlightSmall" justifyH="LEFT">
					<Size x="250" />
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="15" y="-5" />
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString parentKey="LootNewGroupLabel" inherits="GameFontHighlightSmall" justifyH="LEFT">
					<Size x="250" />
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.LootGroupLabel" relativePoint="RIGHT" x="20" />
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="ARTWORK">
				<FontString parentKey="ItemListLabel" inherits="GameFontHighlightSmall" justifyH="LEFT">
					<Size x="250" />
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="15" y="-45" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<EditBox parentKey="NewGroup" letters="40" inherits="InputBoxTemplate" autoFocus="false">
				<Size x="250" y="30" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.LootNewGroupLabel" relativePoint="BOTTOMLEFT" y="2" />
				</Anchors>
				<FontString inherits="GameFontHighlightSmall" />
				<Scripts>
					<OnEnterPressed>
						self:GetParent():GetParent():AddNewGroup(self)
					</OnEnterPressed>
					<OnEnter>
					  	self:GetParent().mainFrame:ShowTooltip(self)
					</OnEnter>
					<OnLeave>
					  	self:GetParent().mainFrame:HideTooltip(self)
					</OnLeave>
				</Scripts>
			</EditBox>
			<EditBox parentKey="ItemList" inherits="InputBoxTemplate" autoFocus="false">
				<Size x="815" y="30" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.ItemListLabel" relativePoint="BOTTOMLEFT" y="2" x="2" />
				</Anchors>
				<FontString inherits="GameFontHighlightSmall" />
				<Scripts>
					<OnEnterPressed>
						self:GetParent():GetParent():AddItems(self)
					</OnEnterPressed>
					<OnEnter>
					  	self:GetParent().mainFrame:ShowTooltip(self)
					</OnEnter>
					<OnLeave>
					  	self:GetParent().mainFrame:HideTooltip(self)
					</OnLeave>
				</Scripts>
			</EditBox>
		</Frames>
	</Frame>

	<Frame name="RSExplorerGroupListTemplate" virtual="true">
		<Size x="260" y="20" />
		<Frames>
			<Button parentKey="Group" inherits="RSExplorerGroupButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("LeftButtonUp", "RightButtonDown");
					</OnLoad>
					<OnClick>
						RSExplorerGroupListButton_OnClick(self, button);
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<Frame name="RSExplorerLootGroupListTemplate" virtual="true">
		<Size x="210" y="200" />
		<Frames>
			<ScrollFrame name="$parentListScrollFrame" parentKey="listScroll" inherits="HybridScrollFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" x="12" y="-6" />
					<Anchor point="BOTTOMRIGHT" x="-3" y="6" />
				</Anchors>
				<Frames>
					<Slider name="$parentScrollBar" inherits="RSExplorerScrollBarTemplate" parentKey="scrollBar">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="-18" y="-30" />
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="-18" y="30" />
						</Anchors>
						<Scripts>
							<OnLoad>
								self.trackBG:Show();
								self.trackBG:SetVertexColor(0, 0, 0, 0.75);
								self.doNotHide = true;
							</OnLoad>
						</Scripts>
					</Slider>
				</Frames>
			</ScrollFrame>
			<Frame parentKey="ElevatedFrame" framelevel="50" setAllPoints="true" />
		</Frames>
	</Frame>

	<Button name="RSExplorerGroupButtonTemplate" virtual="true">
		<Size x="170" y="20" />
		<Anchors>
			<Anchor point="TOPLEFT" />
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="BG" atlas="GarrMission_FollowerListButton" useAtlasSize="false">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture parentKey="Selected" atlas="GarrMission_FollowerListButton-Select" useAtlasSize="false" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString parentKey="Name" inherits="GameFontNormal" justifyH="LEFT">
					<Size x="180" y="0" />
					<Anchors>
						<Anchor point="LEFT" x="5" Y="-1" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<HighlightTexture parentKey="Highlight" atlas="GarrMission_FollowerListButton-Highlight" useAtlasSize="false">
			<Anchors>
				<Anchor point="TOPLEFT" />
				<Anchor point="BOTTOMRIGHT" />
			</Anchors>
		</HighlightTexture>
	</Button>

	<Frame name="RSExplorerGroupInfo" virtual="true">
		<Anchors>
			<Anchor point="TOPLEFT" />
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="BG" atlas="UI-Frame-Neutral-CardParchmentWider" useAtlasSize="false">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString parentKey="NoItems" inherits="GameFontNormal" hidden="true" justifyH="LEFT">
					<Anchors>
						<Anchor point="CENTER" />
					</Anchors>
					<Color r="0" g="0" b="0" a="1" />
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<EditBox parentKey="EditGroupName" letters="40" inherits="InputBoxTemplate" autoFocus="false">
				<Size x="250" y="30" />
				<Anchors>
					<Anchor point="TOPLEFT" y="-20" x="40" />
				</Anchors>
				<FontString inherits="GameFontHighlightSmall" />
				<Scripts>
					<OnEnterPressed>
						self:GetParent():GetParent():EditGroupName(self)
					</OnEnterPressed>
					<OnEnter>
					  	self:GetParent().mainFrame:ShowTooltip(self)
					</OnEnter>
					<OnLeave>
					  	self:GetParent().mainFrame:HideTooltip(self)
					</OnLeave>
				</Scripts>
			</EditBox>
			<Button parentKey="DeleteGroup" inherits="StaticPopupButtonTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.EditGroupName" relativePoint="RIGHT" />
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():GetParent():DeleteGroup(self, button)
					</OnClick>
				</Scripts>
			</Button>
			<Frame parentKey="ItemPanel">
				<Anchors>
					<Anchor point="TOPLEFT" y="-50" x="35" />
					<Anchor point="BOTTOMRIGHT" y="30" x="-30" />
				</Anchors>
			</Frame>
		</Frames>
	</Frame>
	
	<Button name="RSExplorerCustomLootItemTemplate" virtual="true">
		<Size x="32" y="32" />
		<Layers>
			<Layer level="ARTWORK">
				<Texture parentKey="Icon">
					<Size x="32" y="32" />
					<Anchors>
						<Anchor point="CENTER" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture parentKey="IconBorder" atlas="GarrMission_RewardsShadow">
					<Size x="32" y="32" />
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.Icon" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				<Texture parentKey="IconOverlay" hidden="true">
					<Size x="34" y="34" />
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.Icon" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter function="RSExplorerCustomLootItem_OnEnter" />
			<OnLeave function="RSExplorerCustomLootItem_OnLeave" />
			<OnClick>
				RSExplorerCustomLootItem_OnClick(self, button);
			</OnClick>
		</Scripts>
	</Button>
</Ui>