<window type="dialog">
    <coordinates>
        <left>0</left>
        <top>0</top>
		<width>1920</width>
		<height>1080</height>
    </coordinates>

    <controls>

        <!-- Background -->
        <control type="group">
            <top>0</top>
            <left>0</left>
            <width>1920</width>
            <height>1080</height>

            <!-- Fallback -->
            <control type="image">
                <texture>white.png</texture>
                <colordiffuse>FF000000</colordiffuse>
                <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
                <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
            </control>

            <!-- Fanart -->
            <control type="image">
                <texture background="true">$INFO[Window().Property(item.art.fanart)]</texture>
                <colordiffuse>66FFFFFF</colordiffuse>
                <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
                <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
            </control>

            <!-- Overlay -->
            <control type="image">
				<texture background="true">white.png</texture>
				<colordiffuse>CC000000</colordiffuse>
                <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
                <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
			</control>
        </control>

		<!-- Clearlogo -->
		<control type="image">
			<animation type="WindowOpen">
                <effect type="slide" start="841,401" time="350" tween="cubic" easing="in"/>
				<effect type="zoom" start="140,140" time="350" center="auto" tween="cubic" easing="in"/>
			</animation>
            <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(instant_close),true)">WindowClose</animation>
            <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <animation type="Conditional" condition="!String.IsEqual(Window().Property(resolving),true)">
                <effect type="slide" start="841,401" time="350" delay="350" tween="cubic" easing="in"/>
				<effect type="zoom" start="140,140" time="350" delay="350" center="auto" tween="cubic" easing="in"/>
			</animation>
			<top>20</top>
			<left>40</left>
			<width>200</width>
			<height>78</height>
			<aspectratio>keep</aspectratio>
			<texture>$INFO[Window().Property(item.art.clearlogo)]</texture>
			<visible>!String.IsEmpty(Window().Property(item.art.clearlogo)) + !String.IsEqual(Window().Property(instant_close),true)</visible>
		</control>

		<!-- Scrollbar -->
		<control type="scrollbar" id="1111">
			<animation effect="fade" time="350" tween="cubic" easing="in" delay="350">WindowOpen</animation>
			<animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(instant_close),true)">WindowClose</animation>
            <animation effect="fade" end="0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <animation effect="fade" time="350" delay="700" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
			<left>10</left>
			<top>110</top>
			<width>20</width>
			<height>890</height>
			<onright>1000</onright>
			<showonepage>false</showonepage>
			<texturesliderbackground colordiffuse="99362e33">white.png</texturesliderbackground>
			<texturesliderbar colordiffuse="66FFFFFF">white.png</texturesliderbar>
			<texturesliderbarfocus colordiffuse="$INFO[Window().Property(settings.color)]">white.png</texturesliderbarfocus>
            <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>
		</control>

        <!-- Sources List -->
        <control type="list" id="1000">
			<animation effect="slide" start="-1400,0" time="350" tween="cubic" easing="in">WindowOpen</animation>
			<animation effect="slide" end="-1400,0" time="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(instant_close),true)">WindowClose</animation>
            <animation effect="slide" end="-1400,0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <animation effect="slide" start="-1400,0" time="350" delay="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <viewtype label="Sources">list</viewtype>
			<pagecontrol>1111</pagecontrol>
			<onleft>1111</onleft>
            <onright>2000</onright>
            <left>40</left>
            <top>100</top>
            <width>1340</width>
            <height>900</height>
            <itemgap>20</itemgap>
            <orientation>vertical</orientation>
            <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>

			<!-- Unfocused Source -->
            <itemlayout height="160">
                <control type="group">
                    <width>1200</width>

					<!-- Card -->
                    <control type="image">
                        <top>10</top>
						<texture>white.png</texture>
                        <colordiffuse>99362e33</colordiffuse>
                    </control>

					<!-- Release Title -->
                    <control type="label">
                        <top>30</top>
                        <left>20</left>
                        <width>1100</width>
                        <height>20</height>
                        <font>font12</font>
                        <textcolor>66FFFFFF</textcolor>
                        <align>left</align>
                        <label>[UPPERCASE]$INFO[ListItem.Property(release_title)][/UPPERCASE]</label>
                    </control>

					<control type="group">
						<top>40</top>
						<left>20</left>

						<control type="group">
							<top>30</top>

							<!-- Debrid Provider -->
							<control type="label">
								<width>600</width>
								<height>20</height>
								<font>font12</font>
								<textcolor>66FFFFFF</textcolor>
								<align>left</align>
								<label>[UPPERCASE]$INFO[ListItem.Property(debrid_provider)][/UPPERCASE]</label>
							</control>

							<!-- Size -->
							<control type="label">
								<height>20</height>
								<font>font12</font>
								<textcolor>66FFFFFF</textcolor>
								<align>left</align>
								<left>620</left>
								<label>[UPPERCASE]$ADDON[plugin.video.seren 30251]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(size)][/COLOR][/UPPERCASE]</label>
							</control>

							<!-- Source Type -->
							<control type="label">
								<right>20</right>
								<height>20</height>
								<font>font12</font>
								<align>right</align>
								<textcolor>66FFFFFF</textcolor>
								<label>[UPPERCASE]$ADDON[plugin.video.seren 30252]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(type)][/COLOR][/UPPERCASE]</label>
							</control>
						</control>

						<control type="group">
							<top>70</top>

							<!-- Provider -->
							<control type="label">
								<width>600</width>
								<height>20</height>
								<font>font12</font>
								<textcolor>66FFFFFF</textcolor>
								<align>left</align>
								<label>[UPPERCASE]$INFO[ListItem.Property(provider)][/UPPERCASE]</label>
							</control>

							<control type="group">
								<right>20</right>

								<!-- Resolution & Info -->
								<control type="label">
									<font>font12</font>
									<align>right</align>
									<height>20</height>
									<textcolor>66FFFFFF</textcolor>
									<label>[UPPERCASE][COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(quality)][/COLOR] | $INFO[ListItem.Property(info_text_piped_color)][/UPPERCASE]</label>
									<visible>!String.IsEmpty(ListItem.Property(info_text_piped_color))</visible>
								</control>

								<!-- Resolution -->
								<control type="label">
									<font>font12</font>
									<align>right</align>
									<height>20</height>
									<textcolor>66FFFFFF</textcolor>
									<label>[UPPERCASE][COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(quality)][/COLOR][/UPPERCASE]</label>
									<visible>String.IsEmpty(ListItem.Property(info_text_piped_color))</visible>
								</control>
							</control>
						</control>
					</control>
                </control>
            </itemlayout>

			<!-- Unfocused Source -->
            <focusedlayout height="160" condition="!Control.HasFocus(1000)">
                <control type="group">
                    <width>1200</width>

					<!-- Card -->
                    <control type="image">
                        <top>10</top>
						<texture>white.png</texture>
                        <colordiffuse>99362e33</colordiffuse>
                    </control>

					<!-- Release Title -->
                    <control type="label">
                        <top>30</top>
                        <left>20</left>
                        <width>1100</width>
                        <height>20</height>
                        <font>font12</font>
                        <textcolor>66FFFFFF</textcolor>
                        <align>left</align>
                        <label>[UPPERCASE]$INFO[ListItem.Property(release_title)][/UPPERCASE]</label>
                    </control>

					<control type="group">
						<top>40</top>
						<left>20</left>

						<control type="group">
							<top>30</top>

							<!-- Debrid Provider -->
							<control type="label">
								<width>600</width>
								<height>20</height>
								<font>font12</font>
								<textcolor>66FFFFFF</textcolor>
								<align>left</align>
								<label>[UPPERCASE]$INFO[ListItem.Property(debrid_provider)][/UPPERCASE]</label>
							</control>

							<!-- Size -->
							<control type="label">
								<height>20</height>
								<font>font12</font>
								<textcolor>66FFFFFF</textcolor>
								<align>left</align>
								<left>620</left>
								<label>[UPPERCASE]$ADDON[plugin.video.seren 30251]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(size)][/COLOR][/UPPERCASE]</label>
							</control>

							<!-- Source Type -->
							<control type="label">
								<right>20</right>
								<height>20</height>
								<font>font12</font>
								<align>right</align>
								<textcolor>66FFFFFF</textcolor>
								<label>[UPPERCASE]$ADDON[plugin.video.seren 30252]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(type)][/COLOR][/UPPERCASE]</label>
							</control>
						</control>

						<control type="group">
							<top>70</top>

							<!-- Provider -->
							<control type="label">
								<width>600</width>
								<height>20</height>
								<font>font12</font>
								<textcolor>66FFFFFF</textcolor>
								<align>left</align>
								<label>[UPPERCASE]$INFO[ListItem.Property(provider)][/UPPERCASE]</label>
							</control>

							<control type="group">
								<right>20</right>

								<!-- Resolution & Info -->
								<control type="label">
									<font>font12</font>
									<align>right</align>
									<height>20</height>
									<textcolor>66FFFFFF</textcolor>
									<label>[UPPERCASE][COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(quality)][/COLOR] | $INFO[ListItem.Property(info_text_piped_color)][/UPPERCASE]</label>
									<visible>!String.IsEmpty(ListItem.Property(info_text_piped_color))</visible>
								</control>

								<!-- Resolution -->
								<control type="label">
									<font>font12</font>
									<align>right</align>
									<height>20</height>
									<textcolor>66FFFFFF</textcolor>
									<label>[UPPERCASE][COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(quality)][/COLOR][/UPPERCASE]</label>
									<visible>String.IsEmpty(ListItem.Property(info_text_piped_color))</visible>
								</control>
							</control>
						</control>
					</control>
                </control>
            </focusedlayout>

			<!-- Focused Source -->
            <focusedlayout height="270" condition="Control.HasFocus(1000)">
                <control type="group">
					<width>1340</width>

					<!-- Card -->
                    <control type="image">
                        <top>10</top>
                        <height>260</height>
                        <texture>white.png</texture>
                        <colordiffuse>FF362e33</colordiffuse>
                    </control>

                    <!-- Source Icon -->
                    <control type="group">
                        <top>40</top>
                        <width>200</width>
                        <height>200</height>

						<!-- Seren Peacock -->
                        <control type="image">
                            <aspectratio>keep</aspectratio>
                            <texture>$INFO[Window().Property(seren.logo)]</texture>
                            <visible>String.IsEmpty(ListItem.Property(source.icon))</visible>
                        </control>

                        <!-- Provider Icon -->
                        <control type="image">
                            <aspectratio>keep</aspectratio>
                            <texture>$INFO[ListItem.Property(source.icon)]</texture>
                            <visible>!String.IsEmpty(ListItem.Property(source.icon))</visible>
                        </control>
                    </control>

					<!-- Release Title -->
                    <control type="label">
                        <top>40</top>
                        <left>210</left>
                        <width>1110</width>
                        <height>20</height>
                        <font>font12</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <align>left</align>
                        <aligny>center</aligny>
                        <label>[B][UPPERCASE]$INFO[ListItem.Property(release_title)][/UPPERCASE][/B]</label>
                    </control>

					<!-- Provider Information -->
					<control type="group">
						<width>800</width>
						<height>70</height>
						<left>210</left>
						<top>100</top>

						<!-- Debrid Provider -->
						<control type="label">
							<font>font12</font>
							<height>20</height>
							<textcolor>FFFFFFFF</textcolor>
							<align>left</align>
							<wrapmultiline>true</wrapmultiline>
							<label>[B][UPPERCASE]$INFO[ListItem.Property(debrid_provider)][/UPPERCASE][/B]</label>
						</control>

						<!-- Provider -->
						<control type="label">
							<top>40</top>
							<font>font12</font>
							<height>20</height>
							<textcolor>FFFFFFFF</textcolor>
							<align>left</align>
							<wrapmultiline>true</wrapmultiline>
							<label>[B][UPPERCASE]$INFO[ListItem.Property(provider)][/UPPERCASE][/B]</label>
						</control>
					</control>

                    <control type="group">
                        <right>20</right>
                        <top>100</top>
						<height>140</height>

						<!-- Size -->
                        <control type="label">
                            <right>0</right>
                            <width>350</width>
                            <height>20</height>
                            <font>font12</font>
                            <textcolor>FFFFFFFF</textcolor>
                            <align>right</align>
                            <label>[B][UPPERCASE]$ADDON[plugin.video.seren 30251]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(size)][/COLOR][/UPPERCASE][/B]</label>
                        </control>

						<!-- Resolution -->
                        <control type="label">
                            <top>40</top>
                            <right>0</right>
                            <width>350</width>
                            <height>20</height>
                            <font>font12</font>
                            <align>right</align>
                            <textcolor>FFFFFFFF</textcolor>
                            <label>[B][UPPERCASE]$ADDON[plugin.video.seren 30237]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(quality)][/COLOR][/UPPERCASE][/B]</label>
                        </control>

						<!-- Source Type -->
                        <control type="label">
                            <top>80</top>
                            <right>0</right>
                            <width>350</width>
                            <height>20</height>
                            <font>font12</font>
                            <align>right</align>
                            <textcolor>FFFFFFFF</textcolor>
                            <label>[B][UPPERCASE]$ADDON[plugin.video.seren 30252]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[ListItem.Property(type)][/COLOR][/UPPERCASE][/B]</label>
                        </control>

						<!-- Info -->
						<control type="label">
							<top>120</top>
                            <right>0</right>
							<font>font12</font>
							<align>right</align>
							<textcolor>FFFFFFFF</textcolor>
							<label>[B][UPPERCASE]$INFO[ListItem.Property(info_text_piped_color)][/UPPERCASE][/B]</label>
						</control>
                    </control>
                </control>
            </focusedlayout>
        </control>

        <!-- Side Info -->
        <control type="group">
			<animation effect="slide" start="600,0" time="350" tween="cubic" easing="in">WindowOpen</animation>
			<animation effect="slide" end="600,0" time="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(instant_close),true)">WindowClose</animation>
            <animation effect="slide" end="600,0" time="350" tween="cubic" easing="in" condition="String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <animation effect="slide" start="600,0" delay="350" time="350" tween="cubic" easing="in" condition="!String.IsEqual(Window().Property(resolving),true)">Conditional</animation>
            <top>110</top>
            <right>20</right>
            <width>500</width>
            <visible>!String.IsEqual(Window().Property(instant_close),true)</visible>

			<!-- Media Info -->
            <control type="group">
                <width>500</width>
                <height>120</height>

				<!-- Card -->
                <control type="image">
                    <texture>white.png</texture>
                    <colordiffuse>99362e33</colordiffuse>
                </control>

                <control type="group">
                    <width>472</width>

					<!-- TV Show Title -->
                    <control type="label">
                        <top>25</top>
                        <font>font27</font>
                        <height>30</height>
                        <align>right</align>
                        <visible>!String.IsEmpty(Window().Property(item.info.season))</visible>
                        <label>[B][COLOR $INFO[Window().Property(settings.color)]][UPPERCASE]$INFO[Window().Property(item.info.tvshowtitle)][/UPPERCASE][/COLOR][/B]</label>
                    </control>

					<!-- Movie Title -->
                    <control type="label">
                        <top>25</top>
                        <font>font27</font>
                        <height>30</height>
                        <align>right</align>
                        <visible>String.IsEmpty(Window().Property(item.info.season))</visible>
                        <label>[B][COLOR $INFO[Window().Property(settings.color)]][UPPERCASE]$INFO[Window().Property(item.info.title)][/UPPERCASE][/COLOR][/B]</label>
                    </control>

					<!-- Season & Episode -->
                    <control type="label">
                        <top>65</top>
                        <height>30</height>
                        <font>font12</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <align>right</align>
                        <visible>!String.IsEmpty(Window().Property(item.info.season))</visible>
                        <label>Season: [COLOR $INFO[Window().Property(settings.color)]]$INFO[Window().Property(item.info.season)] [/COLOR] | Episode: [COLOR $INFO[Window().Property(settings.color)]]$INFO[Window().Property(item.info.episode)][/COLOR]</label>
                    </control>

					<!-- Year & Rating -->
                    <control type="label">
                        <top>65</top>
                        <height>30</height>
                        <font>font12</font>
                        <textcolor>FFFFFFFF</textcolor>
                        <align>right</align>
                        <visible>String.IsEmpty(Window().Property(item.info.season))</visible>
                        <label>$ADDON[plugin.video.seren 30557]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[Window().Property(item.info.year)] [/COLOR] | $ADDON[plugin.video.seren 30558]: [COLOR $INFO[Window().Property(settings.color)]]$INFO[Window().Property(item.info.mpaa)][/COLOR]</label>
                    </control>
                </control>
            </control>

			<!-- Plot -->
            <control type="group">
                <width>500</width>
                <height>530</height>
                <top>130</top>

				<!-- Card -->
                <control type="image">
                    <texture>white.png</texture>
                    <colordiffuse>99362e33</colordiffuse>
                </control>

                <control type="label">
                    <wrapmultiline>true</wrapmultiline>
                    <top>20</top>
                    <left>20</left>
                    <height>480</height>
                    <width>460</width>
                    <font>font12</font>
                    <textcolor>FFFFFFFF</textcolor>
                    <align>left</align>
					<aligny>top</aligny>
                    <label>$INFO[Window().Property(item.info.plot)]</label>
                </control>
            </control>

			<!-- Buttons -->
            <control type="group">
                <top>670</top>
                <width>500</width>
                <height>220</height>

				<!-- Card -->
                <control type="image">
                    <texture>white.png</texture>
                    <colordiffuse>99362e33</colordiffuse>
                </control>

                <control type="grouplist" id="2000">
                    <top>25</top>
                    <onleft>1000</onleft>
                    <itemgap>10</itemgap>

					<!-- View Uncached -->
                    <control type="button" id="2001">
                        <height>80</height>
                        <textoffsetx>20</textoffsetx>
                        <texturefocus colordiffuse="$INFO[Window().Property(settings.color)]">white.png</texturefocus>
                        <texturenofocus colordiffuse="22000000">white.png</texturenofocus>
                        <label>$ADDON[plugin.video.seren 30461]</label>
                        <align>right</align>
                        <textcolor>FFFFFFFF</textcolor>
                    </control>

					<!-- Close -->
                    <control type="button" id="2999">
                        <height>80</height>
                        <textoffsetx>20</textoffsetx>
                        <texturefocus colordiffuse="$INFO[Window().Property(settings.color)]">white.png</texturefocus>
                        <texturenofocus colordiffuse="22000000">white.png</texturenofocus>
                        <label>$ADDON[plugin.video.seren 30459]</label>
                        <align>right</align>
                        <textcolor>FFFFFFFF</textcolor>
                    </control>
                </control>
            </control>
        </control>
    </controls>
</window>
