<Ui xmlns="http://www.blizzard.com/wow/ui/">
  <Frame
    name="AuctionatorShoppingItemTemplate"
    mixin="AuctionatorShoppingItemMixin"
    inherits="ButtonFrameTemplate"
    frameStrata="Dialog"
    enableMouse="true"
    virtual="true"
    hidden="true"
  >
    <Size x="350" y="350" />

    <Scripts>
      <OnLoad method="OnLoad" />
      <OnShow method="OnShow" />
      <OnHide method="OnHide" />
      <OnKeyDown method="OnKeyDown" />
      <OnKeyUp method="OnKeyUp" />
    </Scripts>

    <Frames>
      <Frame inherits="AuctionatorConfigurationSubHeadingFrame" parentKey="SearchStringHeading">
        <KeyValues>
          <KeyValue key="subHeadingText" value="AUCTIONATOR_L_SEARCH_TERM" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.Inset" relativePoint="TOPLEFT" y="-5" />
        </Anchors>
      </Frame>

      <Frame parentKey="SearchContainer">
        <Size y="48" />
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.SearchStringHeading" relativePoint="BOTTOMLEFT" />
          <Anchor point="RIGHT" />
        </Anchors>
        <Frames>
          <EditBox autoFocus="false" inherits="InputBoxTemplate" parentKey="SearchString" letters="100">
            <Size x="180" y="20"/>
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="24" y="-4" />
            </Anchors>
            <FontString inherits="ChatFontNormal" justifyH="LEFT"/>
            <Scripts>
              <OnEnterPressed>self:GetParent():GetParent():OnFinishedClicked()</OnEnterPressed>
              <OnEscapePressed>self:ClearFocus()</OnEscapePressed>
              <OnTabPressed>self:GetParent():GetParent().LevelRange:SetFocus()</OnTabPressed>
            </Scripts>
          </EditBox>

          <Button parentKey="ResetSearchStringButton" inherits="AuctionatorResetButton">
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.SearchString" relativePoint="TOPRIGHT" x="3" y="-3"/>
            </Anchors>
          </Button>

          <CheckButton inherits="UICheckButtonTemplate" parentKey="IsExact">
            <Size x="20" y="20" />
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.SearchString"  relativePoint="BOTTOMLEFT" x="-8" />
            </Anchors>
            <Layers>
              <Layer level="BACKGROUND">
                <FontString inherits="GameFontHighlight" text="AUCTIONATOR_L_EXACT_SEARCH">
                  <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent" x="25" y="-4" />
                  </Anchors>
                </FontString>
              </Layer>
            </Layers>
          </CheckButton>
        </Frames>
      </Frame>

      <Frame inherits="AuctionatorConfigurationSubHeadingFrame" parentKey="ItemClassHeading">
        <KeyValues>
          <KeyValue key="subHeadingText" value="AUCTIONATOR_L_ITEM_CLASS" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.SearchContainer" relativePoint="BOTTOMLEFT"/>
        </Anchors>
      </Frame>

      <Frame name="$parent_FilterKeySelector" parentKey="FilterKeySelector" inherits="AuctionatorFilterKeySelectorTemplate">
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.ItemClassHeading" relativePoint="BOTTOMLEFT"/>
        </Anchors>
      </Frame>

      <Frame inherits="AuctionatorConfigurationMinMaxFrame" parentKey="LevelRange">
        <KeyValues>
          <KeyValue key="titleText" value="AUCTIONATOR_L_LEVEL" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.FilterKeySelector" relativePoint="BOTTOMLEFT"/>
        </Anchors>
      </Frame>

      <Frame inherits="AuctionatorConfigurationMinMaxFrame" parentKey="ItemLevelRange">
        <KeyValues>
          <KeyValue key="titleText" value="AUCTIONATOR_L_ITEM_LEVEL" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.LevelRange" relativePoint="TOPRIGHT"/>
        </Anchors>
      </Frame>

      <Frame inherits="AuctionatorConfigurationMinMaxFrame" parentKey="PriceRange">
        <KeyValues>
          <KeyValue key="titleText" value="AUCTIONATOR_L_PRICE" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.LevelRange" relativePoint="BOTTOMLEFT" y="-8"/>
        </Anchors>
      </Frame>

      <Frame inherits="AuctionatorConfigurationMinMaxFrame" parentKey="CraftedLevelRange">
        <KeyValues>
          <KeyValue key="titleText" value="AUCTIONATOR_L_CRAFTED_LEVEL" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.PriceRange" relativePoint="TOPRIGHT"/>
        </Anchors>
      </Frame>

      <Frame inherits="AuctionatorConfigurationNumericInputAlternate" parentKey="PurchaseQuantity">
        <KeyValues>
          <KeyValue key="labelText" value="AUCTIONATOR_L_QUANTITY" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.PriceRange" relativePoint="BOTTOMLEFT" y="-22" x="30"/>
        </Anchors>
      </Frame>

      <Frame parentKey="QualityContainer">
        <Size x="50" y="20"/>
        <Anchors>
          <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.PurchaseQuantity" x="-4"/>
        </Anchors>
        <Layers>
          <Layer level="BACKGROUND">
            <FontString inherits="GameFontHighlight" parentKey="Label" text="RARITY">
              <Anchors>
                <Anchor point="TOPLEFT"/>
              </Anchors>
            </FontString>
          </Layer>
        </Layers>
        <Frames>
          <Frame inherits="AuctionatorDropDown" parentKey="DropDown">
            <KeyValues>
              <KeyValue key="labelText" value="" type="string" />
            </KeyValues>
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.Label" relativePoint="TOPRIGHT" y="8"/>
            </Anchors>
          </Frame>

          <Button parentKey="ResetQualityButton" inherits="AuctionatorResetButton">
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.DropDown.DropDown" relativePoint="TOPRIGHT" x="5" y="-5"/>
            </Anchors>
          </Button>
        </Frames>
      </Frame>

      <Frame parentKey="ExpansionContainer">
        <Size x="50" y="20"/>
        <Anchors>
          <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.QualityContainer" x="-6" y="-20" />
        </Anchors>
        <Layers>
          <Layer level="BACKGROUND">
            <FontString inherits="GameFontHighlight" parentKey="Label" text="AUCTIONATOR_L_EXPANSION">
              <Anchors>
                <Anchor point="TOPLEFT"/>
              </Anchors>
            </FontString>
          </Layer>
        </Layers>
        <Frames>
          <Frame inherits="AuctionatorDropDown" parentKey="DropDown">
            <KeyValues>
              <KeyValue key="labelText" value="" type="string" />
            </KeyValues>
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.Label" relativePoint="TOPRIGHT" y="8"/>
            </Anchors>
          </Frame>

          <Button parentKey="ResetExpansionButton" inherits="AuctionatorResetButton">
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.DropDown.DropDown" relativePoint="TOPRIGHT" x="5" y="-5"/>
            </Anchors>
          </Button>
        </Frames>
      </Frame>

      <Frame parentKey="TierContainer">
        <Size x="50" y="20"/>
        <Anchors>
          <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.ExpansionContainer" x="25" y="-20" />
        </Anchors>
        <Layers>
          <Layer level="BACKGROUND">
            <FontString inherits="GameFontHighlight" parentKey="Label" text="AUCTIONATOR_L_TIER">
              <Anchors>
                <Anchor point="TOPLEFT"/>
              </Anchors>
            </FontString>
          </Layer>
        </Layers>
        <Frames>
          <Frame inherits="AuctionatorDropDown" parentKey="DropDown">
            <KeyValues>
              <KeyValue key="labelText" value="" type="string" />
            </KeyValues>
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.Label" relativePoint="TOPRIGHT" y="8"/>
            </Anchors>
          </Frame>

          <Button parentKey="ResetTierButton" inherits="AuctionatorResetButton">
            <Anchors>
              <Anchor point="TOPLEFT" relativeKey="$parent.DropDown.DropDown" relativePoint="TOPRIGHT" x="5" y="-5"/>
            </Anchors>
          </Button>
        </Frames>
      </Frame>

      <!-- Action Buttons -->
      <Button parentKey="Finished" inherits="UIPanelDynamicResizeButtonTemplate" text="">
        <Anchors>
          <Anchor point="TOPRIGHT" relativeKey="$parent.Inset" relativePoint="BOTTOMRIGHT" />
        </Anchors>

        <Scripts>
          <OnClick>self:GetParent():OnFinishedClicked()</OnClick>
        </Scripts>
      </Button>

      <Button parentKey="Cancel" inherits="UIPanelDynamicResizeButtonTemplate" text="AUCTIONATOR_L_CANCEL">
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.Inset" relativePoint="BOTTOMLEFT"/>
        </Anchors>

        <Scripts>
          <OnClick>self:GetParent():OnCancelClicked()</OnClick>
        </Scripts>
      </Button>

      <Button parentKey="ResetAllButton" inherits="UIPanelDynamicResizeButtonTemplate" text="AUCTIONATOR_L_RESET_ALL">
        <Anchors>
          <Anchor point="TOPLEFT" relativeKey="$parent.Cancel" relativePoint="TOPRIGHT"/>
        </Anchors>
        <Scripts>
          <OnClick>self:GetParent():ResetAll()</OnClick>
        </Scripts>
      </Button>
    </Frames>
  </Frame>
</Ui>
