<Ui>
  <Frame name="AuctionatorBuyDialogTemplate" frameStrata="Dialog" mixin="AuctionatorBuyDialogMixin" virtual="true" enableMouse="true" movable="true" clampedToScreen="true">
    <Scripts>
      <OnLoad method="OnLoad"/>
      <OnEvent method="OnEvent"/>
      <OnShow method="OnShow"/>
      <OnHide method="OnHide"/>
      <OnDragStart>
        self:StartMoving()
      </OnDragStart>
      <OnDragStop>
        self:StopMovingOrSizing()
      </OnDragStop>
    </Scripts>
    <KeyValues>
      <KeyValue key="layoutType" value="Dialog" type="string"/>
    </KeyValues>
    <Anchors>
      <Anchor point="CENTER"/>
    </Anchors>
    <Size x="400" y="140"/>
    <Frames>
      <Frame parentKey="Overlay" enableMouse="true" useParentLevel="true">
        <Anchors>
          <Anchor point="TOPLEFT" x="-10" relativeKey="$parent.$parent"/>
          <Anchor point="BOTTOMRIGHT" y="-22" relativeKey="$parent.$parent"/>
        </Anchors>
      </Frame>
    </Frames>
    <Layers>
      <Layer>
        <FontString parentKey="PurchaseDetails" inherits="GameFontHighlightLarge" text="AUCTIONATOR_L_BUYING_X_FOR_X">
          <Anchors>
            <Anchor point="CENTER" y="30"/>
          </Anchors>
        </FontString>
        <FontString parentKey="UnitPrice" inherits="GameFontHighlight" text="AUCTIONATOR_L_BRACKETS_X_EACH">
          <Anchors>
            <Anchor point="TOP" relativeKey="$parent.PurchaseDetails" relativePoint="BOTTOM" y="-6"/>
          </Anchors>
        </FontString>
        <FontString parentKey="NumberPurchased" inherits="GameFontNormal" text="AUCTIONATOR_L_ALREADY_PURCHASED_X">
          <Anchors>
            <Anchor point="TOP" relativeKey="$parent.UnitPrice" relativePoint="BOTTOM" y="-8"/>
          </Anchors>
        </FontString>
        <FontString parentKey="PriceWarning" inherits="GameFontRedLarge" text="AUCTIONATOR_L_PRICE_INCREASE_WARNING">
          <Anchors>
            <Anchor point="TOP" relativeKey="$parent.NumberPurchased" relativePoint="BOTTOM" y="13"/>
          </Anchors>
        </FontString>
      </Layer>
      <Layer level="BACKGROUND">
        <Texture parentKey="Background">
          <Anchors>
            <Anchor point="TOPLEFT" x="6" y="-8"/>
            <Anchor point="BOTTOMRIGHT" x="-6" y="8"/>
          </Anchors>
          <Color r="0" g="0" b="0" a="0.8"/>
        </Texture>
      </Layer>
    </Layers>
    <Frames>
      <Frame parentKey="NineSlice" inherits="NineSlicePanelTemplate" />
      <Button inherits="UIPanelDynamicResizeButtonTemplate" text="AUCTIONATOR_L_CLOSE" parentKey="Cancel">
        <Anchors>
          <Anchor point="BOTTOM" y="20" />
          <Anchor point="RIGHT" x="-20" />
        </Anchors>
        <Scripts>
          <OnClick>
            self:GetParent():Hide()
          </OnClick>
        </Scripts>
      </Button>
      <Button inherits="UIPanelDynamicResizeButtonTemplate" text="AUCTIONATOR_L_BUY_STACK" parentKey="BuyStack">
        <Anchors>
          <Anchor point="TOPRIGHT" relativeKey="$parent.Cancel" relativePoint="TOPLEFT" />
        </Anchors>
        <Scripts>
          <OnClick>
            self:GetParent():BuyStackClicked()
          </OnClick>
        </Scripts>
      </Button>

      <Frame inherits="AuctionatorConfigurationCheckbox" parentKey="ChainBuy">
        <KeyValues>
          <KeyValue key="labelText" value="AUCTIONATOR_L_CHAIN_BUY" type="global"/>
          <KeyValue key="tooltipTitleText" value="AUCTIONATOR_L_CHAIN_BUY_TOOLTIP_HEADER" type="global"/>
          <KeyValue key="tooltipText" value="AUCTIONATOR_L_CHAIN_BUY_TOOLTIP_TEXT" type="global"/>
        </KeyValues>
        <Anchors>
          <Anchor point="BOTTOM" y="5" />
          <Anchor point="LEFT" x="0" />
          <Anchor point="RIGHT" relativeKey="$parent.BuyStack" relativePoint="LEFT"/>
        </Anchors>
      </Frame>
    </Frames>
  </Frame>
</Ui>
