<?xml version="1.0" encoding="utf-8"?>
<window>
	<defaultcontrol always="true">500</defaultcontrol>
  <menucontrol>9000</menucontrol>
	<backgroundcolor>bgcolor</backgroundcolor>
	<onunload>Skin.Reset(SearchYouTubeString)</onunload>
	<views>500</views>
	<controls>
		<control type="group">
			<include>GlobalFanart</include>
			<include>BackgroundDarkness</include>
			<include>FanartFade</include>
		</control>
		<control type="group">
			<include>InfoDialogs_OpenCloseAnimation</include>
			<animation type="Conditional" condition="Window.IsActive(script-script.module.kodi65-t9search.xml)" reversible="false">
				<effect type="slide" start="0,0" end="342,0" time="420" tween="quadratic" easing="out" />
			</animation>
			<animation type="Conditional" condition="!Window.IsActive(script-script.module.kodi65-t9search.xml)" reversible="false">
				<effect type="slide" start="342,0" end="0,0" time="420" tween="quadratic" easing="out" />
			</animation>
			<animation type="Conditional" reversible="false" condition="![Window.IsActive(favourites) | [Window.IsActive(PlayerControls) + [Skin.HasSetting(EnableQuickNav) | Player.HasMedia]]]">
				<effect type="fade" start="0" end="100" time="AnimationsFadeTime" delay="100" tween="sine" easing="in" />
				<effect type="zoom" start="95" end="100" time="AnimationsSlideTime" delay="100" center="auto" tween="sine" easing="out" />
			</animation>
			<animation type="Conditional" reversible="false" condition="Window.IsActive(favourites) | [Window.IsActive(PlayerControls) + [Skin.HasSetting(EnableQuickNav) | Player.HasMedia]]">
				<effect type="zoom" start="100" end="95" center="auto" tween="sine" delay="0" easing="out" time="AnimationsSlideTime" />
				<effect type="fade" start="100" end="0" tween="sine" easing="out" delay="0" time="AnimationsFadeTime" />
			</animation>
			<control type="panel" id="500">
				<left>40</left>
				<top>117</top>
				<width>1200</width>
				<height>438</height>
				<onleft>9000</onleft>
				<onright>60</onright>
				<onup>700</onup>
				<ondown>600</ondown>
				<orientation>vertical</orientation>
				<pagecontrol>60</pagecontrol>
				<preloaditems>4</preloaditems>
				<viewtype label="31085">icons</viewtype>
				<scrolltime tween="Quadratic" easing="out">300</scrolltime>
				<itemlayout height="146" width="239.5">
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<texture border="30">views/other/panel.png</texture>
					</control>
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<aspectratio align="center" aligny="center">scale</aspectratio>
						<texture background="true" fallback="thumbs/fallback_fanart_tp.png">$VAR[VarArtThumb]</texture>
						<bordersize>ThumbsBorderSize</bordersize>
					</control>
					<include content="ThumbnailsOnThumbInfo">
						<param name="left" value="137"/>
						<param name="top" value="100"/>
						<param name="width" value="76"/>
						<param name="label" value="$INFO[ListItem.Property(Duration)]"/>
						<param name="visible" value="!String.IsEmpty(ListItem.Duration)"/>
					</include>
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<texture background="true">overlays/unwatched/banners/UnWatched_Episodes.png</texture>
						<bordersize>ThumbsBorderSize</bordersize>
						<visible>String.IsEqual(ListItem.Overlay,OverlayUnWatched.png)</visible>
					</control>
				</itemlayout>
				<focusedlayout height="146" width="239.5">
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<texture border="30">views/other/panel.png</texture>
					</control>
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<aspectratio align="center" aligny="center">scale</aspectratio>
						<texture background="true" fallback="thumbs/fallback_fanart_tp.png">$VAR[VarArtThumb]</texture>
						<bordersize>ThumbsBorderSize</bordersize>
					</control>
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<texture background="true">overlays/unwatched/banners/UnWatched_Episodes.png</texture>
						<bordersize>ThumbsBorderSize</bordersize>
						<visible>String.IsEqual(ListItem.Overlay,OverlayUnWatched.png)</visible>
					</control>
					<include content="ThumbnailsOnThumbInfo">
						<param name="left" value="137"/>
						<param name="top" value="100"/>
						<param name="width" value="76"/>
						<param name="label" value="$INFO[ListItem.Property(Duration)]"/>
						<param name="visible" value="!String.IsEmpty(ListItem.Duration)"/>
					</include>
					<control type="image">
						<left>5</left>
						<top>5</top>
						<width>231</width>
						<height>137</height>
						<colordiffuse>$VAR[Textures.GlobalColor]</colordiffuse>
						<texture border="30">views/other/focus_panel.png</texture>
						<include>ThumbnailsFocusAnimation</include>
					</control>
				</focusedlayout>
			</control>
			<control type="label">
				<left>45</left>
				<top>560</top>
				<width>1000</width>
				<font>FontSize_24B</font>
				<textcolor>viewsinfo</textcolor>
				<label>$INFO[ListItem.Label]</label>
			</control>
			<control type="label">
				<left>45</left>
				<top>585</top>
				<width>1000</width>
				<font>FontSize_18B</font>
				<textcolor>viewsinfo</textcolor>
				<label>$INFO[ListItem.Property(ViewCount),, $ADDON[script.extendedinfo 32061]]$INFO[ListItem.Premiered,  •  ]</label>
			</control>
			<control type="button" id="600">
				<onfocus>SetFocus(500)</onfocus>
				<include>HiddenItem</include>
			</control>
			<control type="button" id="700">
				<onfocus>SetFocus(500)</onfocus>
				<include>HiddenItem</include>
			</control>
			<control type="scrollbar" id="60">
				<right>30</right>
				<top>122</top>
				<width>6</width>
				<height>428</height>
				<texturesliderbackground></texturesliderbackground>
				<texturesliderbar border="0,14,0,14">views/scrollbar/scrollbar.png</texturesliderbar>
				<texturesliderbarfocus border="0,14,0,14">views/scrollbar/scrollbar.png</texturesliderbarfocus>
				<textureslidernib></textureslidernib>
				<textureslidernibfocus></textureslidernibfocus>
				<onleft>500</onleft>
				<onright>500</onright>
				<showonepage>false</showonepage>
				<orientation>vertical</orientation>
				<animation effect="fade" start="100" end="0" time="250" condition="!Control.HasFocus(60) + !Container.Scrolling">Conditional</animation>
			</control>
			<control type="grouplist">
				<right>40</right>
				<top>565</top>
				<width>535</width>
				<itemgap>6</itemgap>
				<orientation>horizontal</orientation>
				<visible>Container(500).HasNext + !String.IsEmpty(Window.Property(ArrowDown))</visible>
				<control type="label">
					<width>500</width>
					<height>24</height>
					<font>FontSize_16B</font>
					<textcolor>viewsinfo</textcolor>
					<align>right</align>
					<label>$LOCALIZE[22082]</label>
				</control>
				<control type="image">
					<width>22</width>
					<height>22</height>
					<colordiffuse>viewsinfo</colordiffuse>
					<texture background="true">icons/submenu_arrow.png</texture>
				</control>
			</control>
		</control>

		<include>CommonDialogsFadeOutBG</include>

		<!-- ================ -->
		<!-- Top Options Menu -->
		<!-- ================ -->
		<control type="group"  id="9000">
			<left>30</left>
			<top>25</top>
			<include>ShutdownMenuAnimation</include>
			<include>OptionsTopMenuAnimation</include>
			<!--
			<include>VisibleHiddenSlideAnimation</include>
			<visible allowhiddenfocus="true">!Window.IsActive(virtualkeyboard) + !Window.IsActive(progressdialog) + !Window.IsActive(okdialog) + !Window.IsActive(yesnodialog) + !Window.IsActive(selectdialog)</visible>
			-->
			<!-- Head Labels -->
			<control type="grouplist">
				<left>75</left>
				<top>0</top>
				<height>70</height>
				<width>1000</width>
				<align>left</align>
				<aligny>center</aligny>
				<itemgap>20</itemgap>
				<orientation>horizontal</orientation>
				<include>OptionsTopMenuHeader</include>
				<control type="label">
					<include>TopSmallLabel</include>
					<label>YouTube</label>
				</control>
			</control>
			<!-- Options -->
			<control type="grouplist" id="9111">
				<left>0</left>
				<top>-12</top>
				<width>405</width>
				<height max="620">auto</height>
				<itemgap>0</itemgap>
				<onleft>500</onleft>
				<onright>500</onright>
				<onup>9111</onup>
				<ondown>9111</ondown>
				<visible>!Skin.HasSetting(EnableKioskMode)</visible>
				<control type="image" id="1">
					<width>405</width>
					<height>75</height>
					<texture>dialogs/menus/topmenus_youtube.png</texture>
				</control>
				<control type="button" id="6000">
					<description>Search T9</description>
					<label>$LOCALIZE[19140]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="7000">
					<description>TMBD</description>
					<label>$ADDON[script.extendedinfo 32024]</label>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5007">
					<description>Type</description>
					<label>$LOCALIZE[467]$INFO[Window.Property(Type),: ]</label>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5001">
					<description>Sort by</description>
					<label>$ADDON[script.extendedinfo 32104]$INFO[Window.Property(Sort_Label),: ]</label>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5002">
					<description>Release Date</description>
					<label>$LOCALIZE[172]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5003">
					<description>Language</description>
					<label>$LOCALIZE[248]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5006">
					<description>2D / 3D</description>
					<label>$ADDON[script.extendedinfo 32066]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5008">
					<description>Duration</description>
					<label>$LOCALIZE[180]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5009">
					<description>Subtitles</description>
					<label>$LOCALIZE[287]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5012">
					<description>Resolution</description>
					<label>$LOCALIZE[169]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5013">
					<description>Type</description>
					<label>$LOCALIZE[564]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<control type="button" id="5005">
					<description>Clear All Filters</description>
					<label>$ADDON[script.extendedinfo 32022]</label>
					<onclick>right</onclick>
					<include>TopLeftMenusButton</include>
				</control>
				<include>OptionsTopMenuEnd</include>
			</control>
		</control>


		<!-- ================ -->
		<!-- Top Content Info -->
		<!-- ================ -->
		<control type="group">
			<left>45</left>
			<top>25</top>
			<include>ShutdownMenuAnimation</include>
			<include>VisibleHiddenSlideAnimation</include>
			<include>InfoDialogs_OpenCloseAnimation</include>
			<visible>!ControlGroup(9000).HasFocus + !Window.IsActive(favourites) + ![Window.IsActive(PlayerControls) + [Skin.HasSetting(EnableQuickNav) | Player.HasMedia]]</visible>
			<control type="grouplist">
				<include>CommonTopInfoGroupList</include>
				<control type="label">
					<include>TopBigLabel</include>
					<label>YouTube</label>
				</control>
				<control type="label">
					<include>TopSmallLabel</include>
					<label>$INFO[Window.Property(Filter_Label)]</label>
				</control>
			</control>
			<control type="label">
				<description>Page Count Label</description>
				<left>65</left>
				<top>45</top>
				<width>965</width>
				<height>20</height>
				<font>FontSize_18</font>
				<textcolor>$VAR[Text.GlobalColor]</textcolor>
				<label>$INFO[Window.Property(TotalItems),, $ADDON[script.extendedinfo 32124]]$INFO[Window.Property(CurrentPage), • $ADDON[script.extendedinfo 32125] ]$INFO[Window.Property(TotalPages), / ]$INFO[Control.GetLabel(5001), • ]</label>
			</control>
		</control>

		<control type="group">
			<left>25</left>
			<top>45</top>
			<include>WeatherAndClock</include>
			<include>InfoDialogs_OpenCloseAnimation</include>
		</control>

	</controls>
</window>
