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

  <Button name = "TwitchStatsEntryTemplate" virtual="true">
    <Size>
      <AbsDimension x="150" y="16" />
    </Size>
    <NormalFont style="GameFontHighlightLeft"/>
  </Button>

  <Frame name="TwitchStatsScreen" hidden="true" parent="UIParent" inherits="BackdropTemplate" enableMouse="true" movable="true">
    <Size>
      <AbsDimension x="512" y="504"/>
    </Size>

    <Anchors>
      <Anchor point="CENTER"/>
    </Anchors>
    <Scripts>
      <OnLoad>self:RegisterForDrag("LeftButton");</OnLoad>
      <OnDragStart>self:StartMoving();</OnDragStart>
      <OnDragStop>self:StopMovingOrSizing();</OnDragStop>
    </Scripts>

    <Layers>
      <Layer level="ARTWORK">
        <FontString name="$parentTitle" text="TwitchEmotesvKEKL usage data" inherits="GameFontNormal" justifyh="LEFT" justifyv="TOP">
          <Anchors>
            <Anchor point="TOPLEFT">
              <Offset>
                <AbsDimension x="4" y="-6"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentTopSentTitle" text="Top sent" inherits="GameFontNormalLarge" justifyh="CENTER" justifyv="MIDDLE">
          <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="128" y="-52"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentTopRecievedTitle" text="Top seen" inherits="GameFontNormalLarge" justifyh="CENTER" justifyv="MIDDLE">
          <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="384" y="-52"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentTopSentText" text="" inherits="GameFontHighlight" nonSpaceWrap="true" maxLines="3" justifyh="LEFT" justifyv="TOP">
          <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="128" y="-160"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentTopRecievedText" text="" inherits="GameFontHighlight" nonSpaceWrap="true" maxLines="3" justifyh="LEFT" justifyv="TOP">
          <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="384" y="-160"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentSearchBoxLabel" text="Search:" inherits="GameFontHighlightSmall" nonSpaceWrap="true" maxLines="3" justifyh="LEFT" justifyv="TOP">
          <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="25" y="-180"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentSeenListTitle" text="Seen" inherits="GameFontNormal" justifyh="LEFT" justifyv="TOP">
          <Anchors>
            <Anchor point="TOPLEFT">
              <Offset>
                <AbsDimension x="256" y="-210"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentSentListTitle" text="Sent" inherits="GameFontNormal" justifyh="LEFT" justifyv="TOP">
          <Anchors>
            <Anchor point="TOPLEFT">
              <Offset>
                <AbsDimension x="4" y="-210"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>
      </Layer>
    </Layers>

    <Frames>

      <ScrollFrame name="TwitchStatsSentScrollBar" inherits="FauxScrollFrameTemplate" hidden="true">
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="-5" y="-225"/>
            </Offset>
          </Anchor>
          <Anchor point="BOTTOMRIGHT">
            <Offset>
              <AbsDimension x="-286" y="8"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnVerticalScroll>
            FauxScrollFrame_OnVerticalScroll(self, offset, 16, TwitchStatsSentScrollBar_Update);
          </OnVerticalScroll>
          <OnShow>
            TwitchStatsSentScrollBar_Update()
          </OnShow>
        </Scripts>
      </ScrollFrame>
      <ScrollFrame name="TwitchStatsRecievedScrollBar" inherits="FauxScrollFrameTemplate" hidden="true">
        <Anchors>
          <Anchor point="TOPLEFT" relativeTo="TwitchStatsSentScrollBar" relativePoint="TOPRIGHT">
            <Offset>
              <AbsDimension x="21" y="0"/>
            </Offset>
          </Anchor>
          <Anchor point="BOTTOMRIGHT">
            <Offset>
              <AbsDimension x="-30" y="8"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnVerticalScroll>
            FauxScrollFrame_OnVerticalScroll(self, offset, 16, TwitchStatsRecievedScrollBar_Update);
          </OnVerticalScroll>
          <OnShow>
            TwitchStatsRecievedScrollBar_Update()
          </OnShow>
        </Scripts>
      </ScrollFrame>
      <!--TODO: Add these programatically -->
      <Button name="TwitchStatsSentEntry1" inherits="TwitchStatsEntryTemplate">
        <Anchors>
          <Anchor point="TOPLEFT" relativeTo="TwitchStatsSentScrollBar" relativePoint="TOPLEFT">
            <Offset>
              <AbsDimension x="8" y="0"/>
            </Offset>
          </Anchor>
        </Anchors>
      </Button>
      <Button name="TwitchStatsRecievedEntry1" inherits="TwitchStatsEntryTemplate">
        <Anchors>
          <Anchor point="TOPLEFT" relativeTo="TwitchStatsRecievedScrollBar" relativePoint="TOPLEFT">
            <Offset>
              <AbsDimension x="8" y="0"/>
            </Offset>
          </Anchor>
        </Anchors>
      </Button>
    </Frames>
  </Frame>

</Ui>