<Template>
  <SetVariable name="BtnType"><Variable name="SubRegion_BtnType"/></SetVariable>

  <!-- Create Singletons for samplers 1-4 because they're needed when
    showing 4 or 8 samplers... -->
  <Template src="skins:LateNight/samplers/singletons.xml"/>
  <!-- ...the create a singleton for samplers_8decks.xml because it's used
    when showing 8 or 16 samplers. -->
  <SingletonDefinition>
    <ObjectName>Samplers_1-8</ObjectName>
    <Children>
      <Template src="skins:LateNight/samplers/samplers_8decks.xml">
        <SetVariable name="Count">1-8</SetVariable>
      </Template>
    </Children>
  </SingletonDefinition>

  <SingletonDefinition>
    <ObjectName>Samplers_9-16</ObjectName>
    <Children>
      <Template src="skins:LateNight/samplers/samplers_row.xml">
        <SetVariable name="Count">9-16</SetVariable>
        <SetVariable name="Sampler1">9</SetVariable>
        <SetVariable name="Sampler2">10</SetVariable>
        <SetVariable name="Sampler3">11</SetVariable>
        <SetVariable name="Sampler4">12</SetVariable>
        <SetVariable name="Sampler5">13</SetVariable>
        <SetVariable name="Sampler6">14</SetVariable>
        <SetVariable name="Sampler7">15</SetVariable>
        <SetVariable name="Sampler8">16</SetVariable>
      </Template>
    </Children>
  </SingletonDefinition>

  <SingletonDefinition>
    <ObjectName>Samplers_17-32</ObjectName>
    <Children>
      <WidgetGroup>
        <ObjectName></ObjectName>
        <Layout>vertical</Layout>
        <SizePolicy>me,min</SizePolicy>
        <Children>
          <Template src="skins:LateNight/samplers/samplers_row.xml">
            <SetVariable name="Count">17-24</SetVariable>
            <SetVariable name="Sampler1">17</SetVariable>
            <SetVariable name="Sampler2">18</SetVariable>
            <SetVariable name="Sampler3">19</SetVariable>
            <SetVariable name="Sampler4">20</SetVariable>
            <SetVariable name="Sampler5">21</SetVariable>
            <SetVariable name="Sampler6">22</SetVariable>
            <SetVariable name="Sampler7">23</SetVariable>
            <SetVariable name="Sampler8">24</SetVariable>
          </Template>
          <Template src="skins:LateNight/samplers/samplers_row.xml">
            <SetVariable name="Count">25-32</SetVariable>
            <SetVariable name="Sampler1">25</SetVariable>
            <SetVariable name="Sampler2">26</SetVariable>
            <SetVariable name="Sampler3">27</SetVariable>
            <SetVariable name="Sampler4">28</SetVariable>
            <SetVariable name="Sampler5">29</SetVariable>
            <SetVariable name="Sampler6">30</SetVariable>
            <SetVariable name="Sampler7">31</SetVariable>
            <SetVariable name="Sampler8">32</SetVariable>
          </Template>
        </Children>
      </WidgetGroup>
    </Children>
  </SingletonDefinition>

  <SingletonDefinition>
    <ObjectName>Samplers_33-48</ObjectName>
    <Children>
      <WidgetGroup>
        <ObjectName></ObjectName>
        <Layout>vertical</Layout>
        <SizePolicy>me,min</SizePolicy>
        <Children>
          <Template src="skins:LateNight/samplers/samplers_row.xml">
            <SetVariable name="Count">33-40</SetVariable>
            <SetVariable name="Sampler1">33</SetVariable>
            <SetVariable name="Sampler2">34</SetVariable>
            <SetVariable name="Sampler3">35</SetVariable>
            <SetVariable name="Sampler4">36</SetVariable>
            <SetVariable name="Sampler5">37</SetVariable>
            <SetVariable name="Sampler6">38</SetVariable>
            <SetVariable name="Sampler7">39</SetVariable>
            <SetVariable name="Sampler8">40</SetVariable>
          </Template>
          <Template src="skins:LateNight/samplers/samplers_row.xml">
            <SetVariable name="Count">41-48</SetVariable>
            <SetVariable name="Sampler1">41</SetVariable>
            <SetVariable name="Sampler2">42</SetVariable>
            <SetVariable name="Sampler3">43</SetVariable>
            <SetVariable name="Sampler4">44</SetVariable>
            <SetVariable name="Sampler5">45</SetVariable>
            <SetVariable name="Sampler6">46</SetVariable>
            <SetVariable name="Sampler7">47</SetVariable>
            <SetVariable name="Sampler8">48</SetVariable>
          </Template>
        </Children>
      </WidgetGroup>
    </Children>
  </SingletonDefinition>

  <SingletonDefinition>
    <ObjectName>Samplers_49-64</ObjectName>
    <Children>
      <WidgetGroup>
        <ObjectName></ObjectName>
        <Layout>vertical</Layout>
        <SizePolicy>me,min</SizePolicy>
        <Children>
          <Template src="skins:LateNight/samplers/samplers_row.xml">
            <SetVariable name="Count">49-56</SetVariable>
            <SetVariable name="Sampler1">49</SetVariable>
            <SetVariable name="Sampler2">50</SetVariable>
            <SetVariable name="Sampler3">51</SetVariable>
            <SetVariable name="Sampler4">52</SetVariable>
            <SetVariable name="Sampler5">53</SetVariable>
            <SetVariable name="Sampler6">54</SetVariable>
            <SetVariable name="Sampler7">55</SetVariable>
            <SetVariable name="Sampler8">56</SetVariable>
          </Template>
          <Template src="skins:LateNight/samplers/samplers_row.xml">
            <SetVariable name="Count">57-64</SetVariable>
            <SetVariable name="Sampler1">57</SetVariable>
            <SetVariable name="Sampler2">58</SetVariable>
            <SetVariable name="Sampler3">59</SetVariable>
            <SetVariable name="Sampler4">60</SetVariable>
            <SetVariable name="Sampler5">61</SetVariable>
            <SetVariable name="Sampler6">62</SetVariable>
            <SetVariable name="Sampler7">63</SetVariable>
            <SetVariable name="Sampler8">64</SetVariable>
          </Template>
        </Children>
      </WidgetGroup>
    </Children>
  </SingletonDefinition>

  <WidgetGroup>
    <Layout>horizontal</Layout>
    <SizePolicy>me,max</SizePolicy>
    <Children>

      <WidgetStack currentpage="[LateNight],sampler_rows" persist="true">
        <Children>

          <!--4 Samplers -->
          <WidgetGroup trigger="[LateNight],show_4samplers" on_hide_select="1">
            <Layout>vertical</Layout>
            <Children>
              <Template src="skins:LateNight/samplers/samplers_4decks.xml"/>
            </Children>
            <Connection>
              <ConfigKey>[LateNight],show_4samplers</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

          <!--8 Samplers -->
          <WidgetGroup trigger="[LateNight],show_8samplers" on_hide_select="0">
            <Layout>vertical</Layout>
            <Children>
              <SingletonContainer>
                <ObjectName>Samplers_1-8</ObjectName>
              </SingletonContainer>
            </Children>
            <Connection>
              <ConfigKey>[LateNight],show_8samplers</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

          <!--16 Samplers -->
          <WidgetGroup trigger="[LateNight],show_16samplers" on_hide_select="1">
            <Layout>vertical</Layout>
            <Children>
              <SingletonContainer>
                <ObjectName>Samplers_1-8</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_9-16</ObjectName>
              </SingletonContainer>
            </Children>
            <Connection>
              <ConfigKey>[LateNight],show_16samplers</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

          <!--32 Samplers -->
          <WidgetGroup trigger="[LateNight],show_32samplers" on_hide_select="2">
            <Layout>vertical</Layout>
            <Children>
              <SingletonContainer>
                <ObjectName>Samplers_1-8</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_9-16</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_17-32</ObjectName>
              </SingletonContainer>
            </Children>
            <Connection>
              <ConfigKey>[LateNight],show_32samplers</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

          <!--48 Samplers -->
          <WidgetGroup trigger="[LateNight],show_48samplers" on_hide_select="3">
            <Layout>vertical</Layout>
            <Children>
              <SingletonContainer>
                <ObjectName>Samplers_1-8</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_9-16</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_17-32</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_33-48</ObjectName>
              </SingletonContainer>
            </Children>
            <Connection>
              <ConfigKey>[LateNight],show_48samplers</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

          <!--64 Samplers -->
          <WidgetGroup trigger="[LateNight],show_64samplers" on_hide_select="4">
            <Layout>vertical</Layout>
            <Children>
              <SingletonContainer>
                <ObjectName>Samplers_1-8</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_9-16</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_17-32</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_33-48</ObjectName>
              </SingletonContainer>
              <SingletonContainer>
                <ObjectName>Samplers_49-64</ObjectName>
              </SingletonContainer>
            </Children>
            <Connection>
              <ConfigKey>[LateNight],show_64samplers</ConfigKey>
              <BindProperty>visible</BindProperty>
            </Connection>
          </WidgetGroup>

        </Children>
      </WidgetStack>

    </Children>
    <Connection>
      <ConfigKey>[Skin],show_samplers</ConfigKey>
      <BindProperty>visible</BindProperty>
    </Connection>
  </WidgetGroup>
</Template>
