<?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="Dragonflight-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"/>
        </Anchors>
      </Button>
    </Frames>
  </Frame>
  <Frame name="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
    <Layers>
      <Layer level="BORDER">
        <Texture parentKey="BaseFrameBackground" atlas="Dragonflight-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="Dragonflight-Landingpage-Background">
          <Anchors>
            <Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT"/>
            <Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT"/>
          </Anchors>
        </Texture>
      </Layer>
    </Layers>
    <Frames>
      <Frame parentKey="RaisedFrameEdges" setAllPoints="true" frameLevel="50">
        <Layers>
          <Layer level="BORDER" textureSubLevel="4">
            <Texture parentKey="BaseFrameTopEdge" atlas="_Dragonflight-Nineslice-EdgeTop" horizTile="true" useAtlasSize="false">
              <Anchors>
                <Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" y="2" />
                <Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" y="615"/>
              </Anchors>
            </Texture>
            <Texture parentKey="BaseFrameBottomEdge" atlas="_Dragonflight-Nineslice-EdgeBottom" horizTile="true" useAtlasSize="false">
              <Anchors>
                <Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" y="-620"/>
                <Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" y="-7" />
              </Anchors>
            </Texture>
            <Texture parentKey="BaseFrameLeftEdge" atlas="!Dragonflight-NineSlice-EdgeLeft" vertTile="true" useAtlasSize="false">
              <Anchors>
                <Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="-2" />
                <Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" x="-565" y="-3" />
              </Anchors>
            </Texture>
            <Texture parentKey="BaseFrameRightEdge" atlas="!Dragonflight-NineSlice-EdgeRight" vertTile="true" useAtlasSize="false">
              <Anchors>
                <Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="563" />
                <Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" x="3" y="-3" />
              </Anchors>
            </Texture>
          </Layer>
          <Layer level="BORDER" textureSubLevel="5">
            <Texture parentKey="BaseFrameTopLeftCorner" atlas="Dragonflight-NineSlice-CornerTopLeft" useAtlasSize="false">
              <Size>
    			<AbsDimension x="32" y="32"/>
  			  </Size>
              <Anchors>
                <Anchor point="TOPLEFT" x="-4" y="-1"/>
              </Anchors>
            </Texture>
            <Texture parentKey="BaseFrameTopRightCorner" atlas="Dragonflight-NineSlice-CornerTopRight" useAtlasSize="false">
              <Size>
    			<AbsDimension x="32" y="32"/>
  			  </Size>
              <Anchors>
                <Anchor point="TOPRIGHT" x="4" y="-1"/>
              </Anchors>
            </Texture>
            <Texture parentKey="BaseFrameBottomLeftCorner" atlas="Dragonflight-NineSlice-CornerBottomLeft" useAtlasSize="false">
              <Size>
    			<AbsDimension x="32" y="32"/>
  			  </Size>
              <Anchors>
                <Anchor point="BOTTOMLEFT" x="-5" y="-2"/>
              </Anchors>
            </Texture>
            <Texture parentKey="BaseFrameBottomRightCorner" atlas="Dragonflight-NineSlice-CornerBottomRight" useAtlasSize="false">
              <Size>
    			<AbsDimension x="32" y="32"/>
  			  </Size>
              <Anchors>
                <Anchor point="BOTTOMRIGHT" x="4" y="-1"/>
              </Anchors>
            </Texture>
          </Layer>
        </Layers>
      </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>
  
  <Texture name="RSMapCanvasDetailTileTemplate" virtual="true" />
  
  <Button name="RSExplorerRareInfoLootItemTemplate" 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="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="-2" x="-5" relativePoint="TOPRIGHT"/>
           </Anchors>
           <Color r="1" g="1" b="1" a=".2"/>
         </Texture>
       </Layer>
       <Layer level="ARTWORK">
         <FontString parentKey="NoItems" inherits="GameFontNormal" hidden="true" justifyH="LEFT">
           <Size x="0" y="18"/>
           <Anchors>
             <Anchor point="LEFT" relativeKey="$parent.Background1" relativePoint="LEFT" x="15" />
           </Anchors>
           <Color r="0" g="0" b="0" a="1"/>
         </FontString>
       </Layer>
     </Layers>
  </Frame>
  <Frame name="RSExplorerRareInfoTemplate" inherits="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
    <Layers>
      <Layer level="BORDER" textureSubLevel="3">
        <Texture parentKey="Header">
          <Anchors>
            <Anchor point="TOPLEFT" x="0" 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="26" y="5"/>
            <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"  y="-83"/>
          </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="-60" 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"/>
          <Anchor point="TOPRIGHT" x="0" y="-450"/>
        </Anchors>
      </Frame>
      <Frame parentKey="Mounts" inherits="RSExplorerRareInfoLootTemplate">
        <Anchors>
     	  <Anchor point="TOPLEFT" relativeKey="$parent.Map" relativePoint="BOTTOMLEFT" x="-2" y="5" />
    	  <Anchor point="BOTTOMRIGHT" relativeKey="$parent.Map" relativePoint="BOTTOM" x="0" y="-38"/>
        </Anchors>
      </Frame>
      <Frame parentKey="Pets" inherits="RSExplorerRareInfoLootTemplate">
        <Anchors>
     	  <Anchor point="TOPLEFT" relativeKey="$parent.Mounts" relativePoint="BOTTOMLEFT" />
    	  <Anchor point="BOTTOMRIGHT" relativeKey="$parent.Mounts" relativePoint="BOTTOMRIGHT" x="0" y="-43"/>
        </Anchors>
      </Frame>
      <Frame parentKey="Toys" inherits="RSExplorerRareInfoLootTemplate">
        <Anchors>
     	  <Anchor point="TOPLEFT" relativeKey="$parent.Pets" relativePoint="BOTTOMLEFT" />
    	  <Anchor point="BOTTOMRIGHT" relativeKey="$parent.Pets" relativePoint="BOTTOMRIGHT" x="0" y="-43"/>
        </Anchors>
      </Frame>
      <Frame parentKey="Drakewatcher" inherits="RSExplorerRareInfoLootTemplate">
        <Anchors>
     	  <Anchor point="TOPLEFT" relativeKey="$parent.Toys" relativePoint="BOTTOMLEFT" />
    	  <Anchor point="BOTTOMRIGHT" relativeKey="$parent.Toys" relativePoint="BOTTOMRIGHT" x="0" y="-43"/>
        </Anchors>
      </Frame>
      <Frame parentKey="Appearances" inherits="RSExplorerRareInfoLootTemplate">
        <Anchors>
     	  <Anchor point="TOPLEFT" relativeKey="$parent.Mounts" relativePoint="TOPRIGHT" x="-5" y="0" />
    	  <Anchor point="BOTTOMRIGHT" x="2" y="5" />
        </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="962" y="762"/>
    <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="RaisedBorder" inherits="NineSlicePanelTemplate" frameLevel="2">
        <KeyValues>
		  <KeyValue key="layoutType" value="UniqueCornersLayout" type="string"/>
		  <KeyValue key="layoutTextureKit" value="Dragonflight" type="string"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT"/>
          <Anchor point="BOTTOMRIGHT"/>
        </Anchors>
      </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>
	      <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="640"/>
        <Anchors>
          <Anchor point="TOPLEFT" x="33" y="-64"/>
        </Anchors>
      </Frame>
      <Frame parentKey="RareInfo" hidden="true" inherits="RSExplorerRareInfoTemplate" frameLevel="3">
	    <Size x="565" y="625"/>
	    <Anchors>
			<Anchor point="TOPRIGHT" x="-58" y="-70"/>
		</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="0"/>
			<Anchor point="BOTTOMRIGHT" x="-38" y="20"/>
		</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" />
    </Frames>
    <Scripts>
      <OnShow method="OnShow"/>
      <OnLoad method="OnLoad"/>
      <OnDragStart>self:StartMoving()</OnDragStart>
  	  <OnDragStop>self:StopMovingOrSizing()</OnDragStop>
    </Scripts>
   </Frame>
  
</Ui>