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

	<Script file="RSExplorerMixin.lua" />

	<Frame name="RSExplorerUITemplate" virtual="true">
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Background" atlas="thewarwithin-landingpage-background" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" x="5" y="-5" />
						<Anchor point="BOTTOMRIGHT" x="-5" y="5" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="CloseButton" inherits="UIPanelCloseButton" frameLevel="800">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-15" Y ="-16"/>
				</Anchors>
			</Button>
			<Frame parentKey="Border" setAllPoints="true" frameLevel="100">
				<Layers>
					<Layer level="OVERLAY">
						<Texture parentKey="Border" atlas="ui-frame-thewarwithin-border">
							<Anchors>
								<Anchor point="TOPLEFT" />
								<Anchor point="BOTTOMRIGHT" />
							</Anchors>
						</Texture>
						<Texture parentKey="BottomEmbellishment" atlas="ui-frame-thewarwithin-embellishmentbottom" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOM"/>
							</Anchors>
						</Texture>
						<Texture parentKey="TopEmbellishment" atlas="ui-frame-thewarwithin-embellishmentbottom" useAtlasSize="true" rotation="180">
							<Anchors>
								<Anchor point="TOP"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
	</Frame>
	<Frame name="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
		<Layers>
			<Layer level="BORDER">
				<Texture parentKey="BaseFrameBackground" atlas="thewarwithin-landingpage-background" horizTile="true" vertTile="true">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER" textureSubLevel="1">
				<Texture parentKey="BoardDropShadow" atlas="thewarwithin-landingpage-background">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame parentKey="Border" setAllPoints="true" frameLevel="100">
				<Layers>
					<Layer level="OVERLAY">
						<Texture parentKey="Border" atlas="ui-frame-thewarwithin-border">
							<Anchors>
								<Anchor point="TOPLEFT" x="-8" />
								<Anchor point="BOTTOMRIGHT" />
							</Anchors>
						</Texture>
						<Texture parentKey="BottomEmbellishment" atlas="ui-frame-thewarwithin-embellishmentbottom" useAtlasSize="true">
							<Anchors>
								<Anchor point="BOTTOM"/>
							</Anchors>
						</Texture>
						<Texture parentKey="TopEmbellishment" atlas="ui-frame-thewarwithin-embellishmentbottom" useAtlasSize="true" rotation="180">
							<Anchors>
								<Anchor point="TOP"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetScale(0.4)
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
	</Frame>

	<Frame name="RSMapCanvasDetailLayerTemplate" mixin="RSExplorerDetailMap" useParentLevel="true" virtual="true">
		<Scripts>
			<OnLoad method="OnLoad" />
			<OnUpdate method="OnUpdate" />
		</Scripts>
	</Frame>

	<Frame name="RSMapCanvasDetailIconsTemplate" useParentLevel="true" virtual="true">
		<Size x="18" y="18" />
		<Layers>
			<Layer level="ARTWORK">
				<Texture parentKey="Texture">
					<Size x="18" y="18" />
					<Anchors>
						<Anchor point="CENTER" x="0" y="0" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Button name="RSExplorerRareInfoLootItemTemplate" virtual="true">
		<Size x="30" y="30" />
		<Layers>
			<Layer level="ARTWORK">
				<Texture parentKey="Icon">
					<Size x="30" y="30" />
					<Anchors>
						<Anchor point="CENTER" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="5">
				<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="5">
				<Texture parentKey="IconOverlay" hidden="true">
					<Size x="34" y="34" />
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.Icon" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter function="RSExplorerRareInfoLootItem_OnEnter" />
			<OnLeave function="RSExplorerRareInfoLootItem_OnLeave" />
			<OnClick>
				RSExplorerRareInfoLootItem_OnClick(self, button);
			</OnClick>
		</Scripts>
	</Button>

	<Frame name="RSExplorerRareInfoLootTemplate" virtual="true">
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Background1" atlas="UI-Frame-Kyrian-CardParchmentWider">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture parentKey="Texture" alphaMode="BLEND">
					<Size x="40" y="40" />
					<Anchors>
						<Anchor point="TOPRIGHT" relativeKey="$parent.Background1" y="-3" x="-4" relativePoint="TOPRIGHT" />
					</Anchors>
					<Color r="1" g="1" b="1" a=".2" />
					<Scripts>
						<OnEnter>
							self:GetParent():GetParent():GetParent():ShowTooltip(self)
						</OnEnter>
						<OnLeave>
							self:GetParent():GetParent():GetParent():HideTooltip(self)
						</OnLeave>
					</Scripts>
				</Texture>
			</Layer>
		</Layers>
	</Frame>
	
	<Frame name="RSExplorerRareInfoTemplate" inherits="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
		<Layers>
			<Layer level="BORDER" textureSubLevel="3">
				<Texture parentKey="Header">
					<Anchors>
						<Anchor point="TOPLEFT" x="18" y="0" />
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="0" y="-66" />
					</Anchors>
					<Color r="0" g="0" b="0" a=".35" />
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString parentKey="Name" inherits="QuestFont_Enormous" justifyH="LEFT">
					<Size x="0" y="18" />
					<Color r="1.0" g="1.0" b="1.0" />
					<Anchors>
						<Anchor point="TOPLEFT" x="30" y="-5" />
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" y="-70" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="AchievementIcon" hidden="true">
				<Size x="54" y="54" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Header" relativePoint="TOPRIGHT" x="-70" y="-20" />
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture file="Interface\AchievementFrame\UI-Achievement-Progressive-Shield">
							<Size x="54" y="52" />
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter function="RSExplorerRareInfoAchievement_OnEnter" />
					<OnLeave function="RSExplorerRareInfoAchievement_OnLeave" />
				</Scripts>
			</Button>
			<Frame parentKey="Map">
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeKey="$parent.Header" relativePoint="BOTTOMLEFT" x="-10" />
					<Anchor point="TOPRIGHT" x="-10" y="-450" />
				</Anchors>
			</Frame>
			<Frame parentKey="Mounts" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="147" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Map" relativePoint="BOTTOMLEFT" y="-5" x="0" />
				</Anchors>
			</Frame>
			<Frame parentKey="Pets" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="147" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Mounts" relativePoint="TOPRIGHT" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Toys" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="147" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Pets" relativePoint="TOPRIGHT" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Drakewatcher" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="147" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Toys" relativePoint="TOPRIGHT" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Custom" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="296" y="144"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Mounts" relativePoint="BOTTOMLEFT" y="2" x="-3" />
				</Anchors>
			</Frame>
			<Frame parentKey="Appearances" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="296" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Custom" relativePoint="TOPRIGHT" x="-4" />
					<Anchor point="BOTTOM" relativeKey="$parent.Custom" relativePoint="BOTTOM" />
				</Anchors>
			</Frame>
		</Frames>
	</Frame>

	<Frame name="RSExplorerControlTemplate" virtual="true">
		<Frames>
			<CheckButton parentKey="AutoFilterCheckButton" inherits="ChatConfigCheckButtonTemplate">
				<Anchors>
					<Anchor point="LEFT" x="25" y="5" />
				</Anchors>
				<Scripts>
					<OnEnter>
						self:GetParent():GetParent():ShowTooltip(self)
					</OnEnter>
					<OnLeave>
						self:GetParent():GetParent():HideTooltip(self)
					</OnLeave>
				</Scripts>
			</CheckButton>
			<Button parentKey="ApplyFiltersButton" inherits="SharedButtonSmallTemplate">
				<Anchors>
					<Anchor point="RIGHT" x="-20" y="5" />
				</Anchors>
				<KeyValues>
					<KeyValue key="atlasName" value="128-RedButton" type="string" />
				</KeyValues>
				<Scripts>
					<OnClick>
						self:GetParent():ApplyFilters(self, button)
					</OnClick>
					<OnEnter>
						self:GetParent():GetParent():ShowTooltip(self)
					</OnEnter>
					<OnLeave>
						self:GetParent():GetParent():HideTooltip(self)
					</OnLeave>
				</Scripts>
			</Button>
			<CheckButton parentKey="CreateProfilesBackupCheckButton" inherits="ChatConfigCheckButtonTemplate">
				<Anchors>
					<Anchor point="RIGHT" relativeKey="$parent.ApplyFiltersButton" relativePoint="LEFT" x="-160" />
				</Anchors>
				<Scripts>
					<OnEnter>
						self:GetParent():GetParent():ShowTooltip(self)
					</OnEnter>
					<OnLeave>
						self:GetParent():GetParent():HideTooltip(self)
					</OnLeave>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

	<Frame name="RSExplorerFrame" hidden="true" inherits="RSExplorerUITemplate" mixin="RSExplorerMixin" enableMouse="true" movable="true" frameLevel="1" frameStrata="HIGH" parent="UIParent" topLevel="true">
		<Size x="1000" y="785" />
		<Anchors>
			<Anchor point="CENTER" />
		</Anchors>
		<Frames>
			<Frame parentKey="OverlayElements" frameLevel="2" setAllPoints="true">
				<Size x="32" y="32" />
				<Anchors>
					<Anchor point="TOPRIGHT" x="4" y="6" />
				</Anchors>
				<Layers>
					<Layer level="BORDER">
						<Texture parentKey="CloseButtonBorder" atlas="UI-Frame-Oribos-ExitButtonBorder" useAtlasSize="true">
							<Anchors>
								<Anchor point="CENTER" relativeKey="$parent.CloseButton" x="0" y="0" />
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
			<Frame parentKey="Filters" mixin="RSExplorerFilters" name="$parentFilters" frameLevel="4">
				<Anchors>
					<Anchor point="TOPLEFT" x="60" y="-30" relativePoint="TOPLEFT" />
					<Anchor point="BOTTOMRIGHT" x="-60" y="-70" relativePoint="TOPRIGHT" />
				</Anchors>
				<Frames>
					<DropdownButton parentKey="FilterDropDown" inherits="WowStyle1FilterDropdownTemplate">
						<Size x="100" y="25" />
						<Anchors>
							<Anchor point="LEFT" x="0" y="1" />
						</Anchors>
						<Scripts>
							<OnEnter>
								self:GetParent():GetParent():ShowTooltip(self)
							</OnEnter>
							<OnLeave>
								self:GetParent():GetParent():HideTooltip(self)
							</OnLeave>
						</Scripts>
					</DropdownButton>
					<DropdownButton parentKey="ContinentDropDown" inherits="WowStyle1DropdownTemplate">
						<Size x="300" y="25" />
						<Anchors>
							<Anchor point="LEFT" relativeKey="$parent.FilterDropDown" relativePoint="RIGHT" x="10" y="0" />
						</Anchors>
					</DropdownButton>
					<CheckButton parentKey="LockCurrentZoneCheckButton" inherits="ChatConfigCheckButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeKey="$parent.ContinentDropDown" relativePoint="RIGHT" x="10" y="0" />
						</Anchors>
						<Scripts>
							<OnEnter>
								self:GetParent():GetParent():ShowTooltip(self)
							</OnEnter>
							<OnLeave>
								self:GetParent():GetParent():HideTooltip(self)
							</OnLeave>
						</Scripts>
					</CheckButton>
					<Button parentKey="RestartScanningButton" inherits="SharedButtonSmallTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-5" y="-2" />
						</Anchors>
						<KeyValues>
							<KeyValue key="atlasName" value="128-RedButton" type="string" />
						</KeyValues>
						<Scripts>
							<OnClick>
								self:GetParent():RestartScanning(self, button)
							</OnClick>
							<OnEnter>
								self:GetParent():GetParent():ShowTooltip(self)
							</OnEnter>
							<OnLeave>
								self:GetParent():GetParent():HideTooltip(self)
							</OnLeave>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Frame parentKey="RareNPCList" hidden="true" inherits="RSExplorerRareListTemplate" mixin="RSExplorerRareList" name="$parentRareList">
				<Size x="305" y="648" />
				<Anchors>
					<Anchor point="TOPLEFT" x="33" y="-64" />
				</Anchors>
			</Frame>
			<Frame parentKey="RareInfo" hidden="true" inherits="RSExplorerRareInfoTemplate" frameLevel="3">
				<Size x="600" y="655" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.RareNPCList" relativePoint="TOPRIGHT" x="5" y="0" />
				</Anchors>
			</Frame>
			<Frame parentKey="Control" inherits="RSExplorerControlTemplate" mixin="RSExplorerControl" hidden="true" frameLevel="4">
				<Size x="574" y="60" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.RareNPCList" relativePoint="BOTTOMLEFT" x="0" y="-20" />
					<Anchor point="BOTTOMRIGHT" x="-38" y="20" />
				</Anchors>
			</Frame>
			<Frame parentKey="CustomLoot" inherits="RSExplorerCustomLootTemplate" hidden="true" mixin="RSExplorerLoot" name="$customLoot">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="60" y="-50" />
					<Anchor point="TOPRIGHT" relativeKey="$parent" relativePoint="TOPRIGHT" x="-60" />
					<Anchor point="BOTTOM" relativeKey="$parent" relativePoint="CENTER" y="-100" />
				</Anchors>
			</Frame>
			<Frame parentKey="ScanRequired" mixin="RSExplorerControl" hidden="true" name="$scannerFrame">
				<Anchors>
          			<Anchor point="TOPLEFT"/>
          			<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString parentKey="ScanRequiredText" maxLines="2" wordwrap="true" inherits="GameFontNormalHuge">
							<Size x="750" y="40" />
							<Anchors>
								<Anchor point="CENTER" x="0" y="10" />
							</Anchors>
						</FontString>
						<FontString parentKey="ScanProcessText" hidden="true" inherits="GameFontNormal">
							<Anchors>
								<Anchor point="TOP" relativeKey="$parent.ScanRequiredText" relativePoint="BOTTOM" x="0" y="-15" />
							</Anchors>
							<Color r="1.0" g="1.0" b="1.0" a="1.0" />
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button parentKey="StartScanningButton" inherits="SharedButtonLargeTemplate">
						<Anchors>
							<Anchor point="TOP" relativeKey="$parent.ScanRequiredText" relativePoint="BOTTOM" x="0" y="-15" />
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():StartScanning(self, button)
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<GameTooltip parentKey="Tooltip" name="ExplorerTooltip" inherits="GameTooltipTemplate" frameStrata="HIGH" frameLevel="1000" virtual="true">
				<KeyValues>
					<KeyValue key="textLeft1Font" value="GameFontHighlight" type="string" />
					<KeyValue key="minimumWidth" value="150" type="number"/>
				</KeyValues>
			</GameTooltip>
		</Frames>
		<Scripts>
			<OnShow method="OnShow" />
			<OnLoad method="OnLoad" />
			<OnDragStart>self:StartMoving()</OnDragStart>
			<OnDragStop>self:StopMovingOrSizing()</OnDragStop>
		</Scripts>
	</Frame>

</Ui>