<?xml version="1.0" encoding="UTF-8"?>
<window>
	<defaultcontrol always="true">9000</defaultcontrol>
	<onunload condition="!String.IsEqual(Window(home).Property(ShutdownKodiContinue),true)">ClearProperty(ShutdownKodi,home)</onunload>
	<controls>
		<include>fadebackground</include>
		<control type="image"><!-- Dialog background image -->
			<left>660</left>
			<top>228</top>
			<width>570</width>
			<height>695</height>
			<texture border="14">button-menu-background.png</texture>
		</control>
		<control type="label"><!-- Dialog heading -->
			<left>675</left>
			<top>243</top>
			<width>540</width>
			<height>45</height>
			<label>$LOCALIZE[31558]$INFO[Container(9000).NumItems,(,)]</label>
			<align>center</align>
		</control>
		<control type="button"><!-- Close button -->
			<left>1200</left>
			<top>210</top>
			<width>48</width>
			<height>48</height>
			<texturefocus>touch-close.png</texturefocus>
			<texturenofocus>touch-close.png</texturenofocus>
			<onclick>Close</onclick>
			<visible>$EXP[isEnabledTouch]</visible>
		</control>
		<control type="image">
			<left>675</left>
			<top>297</top>
			<width>540</width>
			<height>6</height>
			<texture>separator.png</texture>
		</control>
		<control type="button" id="999"><!-- Dummy hidden button to close dialog -->
			<left>-15</left>
			<top>-15</top>
			<width>1</width>
			<height>1</height>
			<onfocus>Close</onfocus>
		</control>
		<control type="list" id="9000">
			<left>675</left>
			<top>306</top>
			<width>540</width>
			<height>675</height>
			<onleft>999</onleft>
			<onright>999</onright>
			<onup>999</onup>
			<ondown>999</ondown>
			<itemlayout height="75">
				<control type="image">
					<left>0</left>
					<top>0</top>
					<width>540</width>
					<height>75</height>
					<texture border="9">button-default.png</texture>
				</control>
				<control type="label">
					<left>23</left>
					<top>20</top>
					<width>495</width>
					<height>36</height>
					<font>apptv22</font>
					<label>$INFO[ListItem.Label]</label>
				</control>
			</itemlayout>
			<focusedlayout height="75">
				<control type="image">
					<left>0</left>
					<top>0</top>
					<width>540</width>
					<height>75</height>
					<texture border="9">button-default-focus.png</texture>
				</control>
				<control type="label">
					<left>23</left>
					<top>20</top>
					<width>495</width>
					<height>36</height>
					<font>apptv22</font>
					<label>$INFO[ListItem.Label]</label>
				</control>
			</focusedlayout>
			<content>
				<item>
					<label>$LOCALIZE[13009]</label>
					<onclick>SetProperty(ShutdownKodiContinue,true,home)</onclick>
					<onclick>Close</onclick>
					<onclick>Quit()</onclick>
				</item>
				<item>
					<label>$LOCALIZE[13016]</label>
					<onclick>SetProperty(ShutdownKodiContinue,true,home)</onclick>
					<onclick>Close</onclick>
					<onclick>Powerdown()</onclick>
					<visible>System.CanPowerDown</visible>
				</item>
				<item>
					<label>$LOCALIZE[20150]</label>
					<onclick>AlarmClock(shutdowntimer,ShutDown())</onclick>
					<onclick>Close</onclick>
					<visible>!System.HasAlarm(shutdowntimer) + [System.CanPowerDown | System.CanSuspend | System.CanHibernate]</visible>
				</item>
				<item>
					<label>$LOCALIZE[20151] $INFO[System.AlarmPos,(,)]</label>
					<onclick>CancelAlarm(shutdowntimer)</onclick>
					<onclick>Close</onclick>
					<visible>System.HasAlarm(shutdowntimer)</visible>
				</item>
				<item>
					<label>$LOCALIZE[13011]</label>
					<onclick>SetProperty(ShutdownKodiContinue,true,home)</onclick>
					<onclick>Close</onclick>
					<onclick>Suspend()</onclick>
					<visible>System.CanSuspend</visible>
				</item>
				<item>
					<label>$LOCALIZE[13010]</label>
					<onclick>SetProperty(ShutdownKodiContinue,true,home)</onclick>
					<onclick>Close</onclick>
					<onclick>Hibernate()</onclick>
					<visible>System.CanHibernate</visible>
				</item>
				<item>
					<label>$LOCALIZE[13013]</label>
					<onclick>SetProperty(ShutdownKodiContinue,true,home)</onclick>
					<onclick>Close</onclick>
					<onclick>Reset()</onclick>
					<visible>System.CanReboot</visible>
				</item>
				<item>
					<label>$LOCALIZE[31554]</label>
					<onclick>SetProperty(ShutdownKodiContinue,true,home)</onclick>
					<onclick>Close</onclick>
					<onclick>System.ExecWait("/usr/sbin/rebootfromnand")</onclick>
					<onclick>Reset()</onclick>
					<visible>System.Platform.Android | System.Platform.Linux</visible>
				</item>
				<item>
					<label>$LOCALIZE[20126] $INFO[system.profilename]</label>
					<onclick>Close</onclick>
					<onclick>System.LogOff</onclick>
					<visible>[System.HasLoginScreen | Integer.IsGreater(System.ProfileCount,1)] + System.Loggedon</visible>
				</item>
				<item>
					<label>$VAR[MasterModeLabel]</label>
					<onclick>Close</onclick>
					<onclick>mastermode</onclick>
					<visible>System.HasLocks</visible>
				</item>
				<item>
					<label>$LOCALIZE[13017]</label>
					<onclick>InhibitIdleShutdown(true)</onclick>
					<onclick>Close</onclick>
					<visible>System.HasShutdown +!System.IsInhibit</visible>
				</item>
				<item>
					<label>$LOCALIZE[13018]</label>
					<onclick>InhibitIdleShutdown(false)</onclick>
					<onclick>Close</onclick>
					<visible>System.HasShutdown + System.IsInhibit</visible>
				</item>
			</content>
		</control>
	</controls>
</window>