<?xml version="1.0" encoding="UTF-8"?>
<includes>

	<!-- Side Menu Headline -->
	<include name="SideBarHeadline">
		<param name="width">100%</param>
		<param name="visible">true</param>
		<param name="color">panel_textcolor</param>
		<param name="spacer">false</param>
		<definition>
			<control type="label" id="98$PARAM[nr]">
				<height>10</height>
				<label/>
				<visible>$PARAM[spacer]</visible>
			</control>
			<control type="group" id="99$PARAM[nr]">
				<visible>$PARAM[visible]</visible>
				<height>50</height>
				<top>$PARAM[top]</top>
				<!-- headline -->
				<control type="label">
					<top>10</top>
					<width>$PARAM[width]</width>
					<height>50</height>
					<font>Med22</font>
					<textcolor>$PARAM[color]</textcolor>
					<label>$PARAM[label]</label>
					<textoffsetx>15</textoffsetx>
					<aligny>top</aligny>
				</control>
			</control>
		</definition>
	</include>

	<!-- Side Panel -->
	<include name="SidePanel">
		<param name="width">450</param>
		<param name="onright">10</param>
		<definition>
			<include content="DiffuseMask">
				<param name="visible">ControlGroup(9999).HasFocus</param>
			</include>
			<control type="group" id="9999">
				<animation type="Conditional" condition="ControlGroup(9999).HasFocus" reversible="true">
					<effect type="slide" start="0,0" end="$PARAM[width],0" time="400" tween="cubic" easing="inout" />
				</animation>
				<animation type="WindowClose" condition="ControlGroup(9999).HasFocus" reversible="true">
					<effect type="slide" start="0,0" end="-$PARAM[width],0" time="0" tween="cubic" easing="out" />
				</animation>
				<left>-$PARAM[width]</left>
				<width>$PARAM[width]</width>

				<!-- background -->
				<control type="image">
					<left>400</left>
					<width>100</width>
					<height>100%</height>
					<texture colordiffuse="black">common/panel_shadow.png</texture>
					<aspectratio>stretch</aspectratio>
					<visible>ControlGroup(9999).HasFocus</visible>
				</control>
				<include content="ContentPanel">
					<param name="width">$PARAM[width]</param>
					<param name="height">100%</param>
					<param name="color">sidepanel_background</param>
				</include>

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

					<!-- home -->
					<control type="list" id="900">
						<top>5</top>
						<height>50</height>
						<width>$PARAM[width]</width>
						<scrolltime>0</scrolltime>
						<onup>noop</onup>
						<onfocus condition="String.IsEmpty(Window(home).Property(SideBarReset)) + !Integer.IsEqual(Container(901).CurrentItem,1)">Control.Move(901,$INFO[Container(901).CurrentItem,-])</onfocus>
						<onfocus condition="String.IsEmpty(Window(home).Property(SideBarReset)) + !Integer.IsEqual(Container(901).CurrentItem,1)">Control.Move(901,1)</onfocus>
						<onfocus>SetProperty(SideBarReset,1,home)</onfocus>
						<ondown condition="!Integer.IsEqual(Container(901).CurrentItem,1)">Control.Move(901,$INFO[Container(901).CurrentItem,-])</ondown>
						<ondown condition="!Integer.IsEqual(Container(901).CurrentItem,1)">Control.Move(901,1)</ondown>
						<ondown>SetFocus(901)</ondown>
						<onright>ClearProperty(SideBarReset,home)</onright>
						<onback>ClearProperty(SideBarReset,home)</onback>
						<onright>$PARAM[onright]</onright>
						<onback>$PARAM[onright]</onback>
						<onup>Control.Move(902,$INFO[Container(902).CurrentItem,-])</onup>
						<onup>902</onup>
						<onfocus>Control.Move(902,$INFO[Container(902).CurrentItem,-])</onfocus>
						<onfocus>Control.Move(902,1)</onfocus>
						<orientation>vertical</orientation>
						<itemlayout height="50" width="$PARAM[width]">
							<include content="SidebarItemLayout">
								<param name="id" value="900"/>
								<param name="width" value="$PARAM[width]"/>
							</include>
						</itemlayout>
						<focusedlayout height="50" width="$PARAM[width]">
							<include content="SidebarItemLayout">
								<param name="id" value="900"/>
								<param name="width" value="$PARAM[width]"/>
								<param name="focused" value="true"/>
							</include>
						</focusedlayout>
						<content>
							<item>
								<label>$LOCALIZE[31000]</label>
								<onclick>Dialog.Close(all,true)</onclick>
								<onclick>ActivateWindow(home)</onclick>
								<icon>&#xf2dc;</icon>
								<property name="forced_icon">true</property>
							</item>
						</content>
					</control>

					<!-- media -->
					<control type="group">
						<visible>Integer.IsGreater(Container(901).NumItems,0)</visible>
						<top>55</top>
						<include content="SideBarHeadline">
							<param name="label">14211</param>
						</include>
						<control type="label">
							<top>10</top>
							<width>$PARAM[width]</width>
							<height>50</height>
							<font>Light22</font>
							<textcolor>30FFFFFF</textcolor>
							<label>$INFO[Container(901).CurrentPage] | $INFO[Container(901).NumPages]</label>
							<textoffsetx>15</textoffsetx>
							<aligny>top</aligny>
							<align>right</align>
							<visible>Integer.IsGreater(Container(901).NumPages,1)</visible>
						</control>
						<control type="list" id="901">
							<top>50</top>
							<include condition="System.HasAddon(plugin.video.embycon)" content="ParamHeight">
								<param name="height" value="650"/>
							</include>
							<height>700</height>
							<width>$PARAM[width]</width>
							<scrolltime>200</scrolltime>
							<onup>SetFocus(900)</onup>
							<ondown>SetFocus(902,0)</ondown>
							<onright>ClearProperty(SideBarReset,home)</onright>
							<onback>ClearProperty(SideBarReset,home)</onback>
							<onright>$PARAM[onright]</onright>
							<onback>$PARAM[onright]</onback>
							<orientation>vertical</orientation>
							<itemlayout height="50" width="$PARAM[width]">
								<include content="SidebarItemLayout">
									<param name="id" value="901"/>
									<param name="width" value="$PARAM[width]"/>
								</include>
							</itemlayout>
							<focusedlayout height="50" width="$PARAM[width]">
								<include content="SidebarItemLayout">
									<param name="id" value="901"/>
									<param name="width" value="$PARAM[width]"/>
									<param name="focused" value="true"/>
								</include>
							</focusedlayout>
							<content>
								<include condition="!Skin.HasSetting(SidePanelMainMenu)">skinshortcuts-group-sidepanel</include>
								<include condition="Skin.HasSetting(SidePanelMainMenu)">skinshortcuts-mainmenu</include>
							</content>
						</control>
					</control>

					<!-- misc -->
					<control type="group">
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,1)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,2)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,3)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,4)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,5)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,6)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,7)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,8)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,9)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,10)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,11)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,12)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,13)">Conditional</animation>
						<animation effect="slide" end="0,-50" condition="Integer.IsLess(Container(901).NumItems,14) | System.HasAddon(plugin.video.embycon)">Conditional</animation>
						<top>810</top>
						<include content="SideBarHeadline">
							<param name="label">$LOCALIZE[31001]</param>
						</include>
						<control type="list" id="902">
							<top>50</top>
							<include condition="System.HasAddon(plugin.video.embycon)" content="ParamHeight">
								<param name="height" value="250"/>
							</include>
							<height>200</height>
							<width>$PARAM[width]</width>
							<scrolltime>0</scrolltime>
							<ondown>900</ondown>
							<onright>ClearProperty(SideBarReset,home)</onright>
							<onback>ClearProperty(SideBarReset,home)</onback>
							<onright>$PARAM[onright]</onright>
							<onback>$PARAM[onright]</onback>
							<onup>SetFocus(901,99999999)</onup>
							<orientation>vertical</orientation>
							<itemlayout height="50" width="$PARAM[width]">
								<include content="SidebarItemLayout">
									<param name="id" value="902"/>
									<param name="width" value="$PARAM[width]"/>
								</include>
							</itemlayout>
							<focusedlayout height="50" width="$PARAM[width]">
								<include content="SidebarItemLayout">
									<param name="id" value="902"/>
									<param name="width" value="$PARAM[width]"/>
									<param name="focused" value="true"/>
								</include>
							</focusedlayout>
							<content>
								<item>
									<label>$LOCALIZE[31129]</label>
									<icon>&#xf450;</icon>
									<onclick>Notification($LOCALIZE[24001],$LOCALIZE[31162])</onclick>
									<onclick>UpdateAddonRepos</onclick>
									<onclick>UpdateLocalAddons</onclick>
									<property name="forced_icon">true</property>
								</item>
								<item>
									<label>$LOCALIZE[5]</label>
									<icon>&#xf493;</icon>
									<onclick>Dialog.Close(all,true)</onclick>
									<onclick>ActivateWindow(settings)</onclick>
									<property name="forced_icon">true</property>
								</item>
								<item>
									<label>$LOCALIZE[20183]</label>
									<icon>&#xf453;</icon>
									<onclick>ReloadSkin()</onclick>
									<property name="forced_icon">true</property>
								</item>
								<item>
									<label>$LOCALIZE[31226]</label>
									<icon>&#xf342;</icon>
									<onclick>RunScript(plugin.video.embycon,0,?mode=CHANGE_USER)</onclick>
									<property name="forced_icon">true</property>
									<visible>System.HasAddon(plugin.video.embycon)</visible>
								</item>
								<item>
									<label>$LOCALIZE[33060]</label>
									<icon>&#xf425;</icon>
									<onclick>ActivateWindow(shutdownmenu)</onclick>
									<property name="forced_icon">true</property>
								</item>
							</content>
						</control>
					</control>

				</control>
			</control>

		</definition>
	</include>

	<include name="SidebarItemLayout">
		<param name="focused">false</param>
		<definition>
			<control type="group">
				<width>$PARAM[width]</width>
				<height>50</height>
				<control type="image">
					<height>50</height>
					<width>$PARAM[width]</width>
					<texture colordiffuse="sidepanel_focus">common/white.jpg</texture>
					<aspectratio>stretch</aspectratio>
					<aligny>center</aligny>
					<visible>Control.HasFocus($PARAM[id]) + $PARAM[focused]</visible>
				</control>
				<control type="label">
					<top>6</top>
					<left>45</left>
					<height>37</height>
					<aligny>center</aligny>
					<align>left</align>
					<font>Material20</font>
					<textcolor>sidepanel_textcolor</textcolor>
					<label>$VAR[SidebarIcon]</label>
				</control>
				<control type="label">
					<top>5</top>
					<left>90</left>
					<right>15</right>
					<height>40</height>
					<align>left</align>
					<aligny>center</aligny>
					<font>Reg22</font>
					<textcolor>sidepanel_textcolor</textcolor>
					<label>$INFO[ListItem.Label]</label>
				</control>
			</control>
		</definition>
	</include>

</includes>