<?xml version="1.0" encoding="UTF-8"?>
<!-- Sign in with the Milionář account (wcs/account/ui.py, docs/plan/milionar-account/040 §1): the look of the first-run
     guide (DialogMilionarOnboarding.xml): brand, hero text, status line, buttons; on the right the QR code the phone
     scans, the code and the short address. Everything is driven by window properties (ac.*). -->
<window type="dialog">
	<defaultcontrol always="true">9000</defaultcontrol>
	<depth>DepthOSD</depth>
	<animation effect="fade" start="0" end="100" time="300">WindowOpen</animation>
	<animation effect="fade" start="100" end="0" time="250">WindowClose</animation>
	<controls>
		<control type="image">
			<left>0</left>
			<top>0</top>
			<width>1920</width>
			<height>1080</height>
			<texture colordiffuse="background">colors/white.png</texture>
		</control>
		<control type="image">
			<left>0</left>
			<top>0</top>
			<width>1920</width>
			<height>1080</height>
			<aspectratio scalediffuse="false">scale</aspectratio>
			<texture colordiffuse="99FFFFFF">presentation/aurora.jpg</texture>
		</control>

		<control type="group">
			<left>120</left>
			<top>48</top>
			<control type="image">
				<width>64</width>
				<height>64</height>
				<aspectratio>keep</aspectratio>
				<texture colordiffuse="milionar_logo_tint">special://home/addons/plugin.video.milionar/resources/media/brand/milionar-mark.png</texture>
			</control>
			<control type="label">
				<left>80</left>
				<width>400</width>
				<height>64</height>
				<font>font32_title</font>
				<aligny>center</aligny>
				<textcolor>milionar_wordmark</textcolor>
				<label>MILIONÁŘ</label>
			</control>
		</control>

		<!-- hero: kicker, title, text, status, buttons -->
		<control type="group">
			<left>120</left>
			<top>220</top>
			<control type="label">
				<width>1000</width>
				<height>40</height>
				<font>font12</font>
				<aligny>center</aligny>
				<textcolor>$INFO[Window(Home).Property(milionar.accent.text)]</textcolor>
				<label>$INFO[Window.Property(ac.kicker)]</label>
			</control>
			<control type="label">
				<top>40</top>
				<width>1000</width>
				<height>110</height>
				<font>font52_title</font>
				<aligny>center</aligny>
				<label>$INFO[Window.Property(ac.title)]</label>
			</control>
			<control type="textbox">
				<top>170</top>
				<width>920</width>
				<height>260</height>
				<font>font13</font>
				<textcolor>cinema_dim</textcolor>
				<label>$INFO[Window.Property(ac.text)]</label>
			</control>
			<control type="grouplist">
				<top>450</top>
				<width>1000</width>
				<height>48</height>
				<orientation>horizontal</orientation>
				<itemgap>14</itemgap>
				<visible>!String.IsEmpty(Window.Property(ac.status))</visible>
				<control type="group">
					<width>40</width>
					<height>48</height>
					<visible>String.IsEqual(Window.Property(ac.status.kind),busy)</visible>
					<include content="MilionarSpinner">
						<param name="size" value="36"/>
						<param name="inner" value="24"/>
					</include>
				</control>
				<control type="image">
					<top>6</top>
					<width>36</width>
					<height>36</height>
					<aspectratio>keep</aspectratio>
					<texture colordiffuse="$INFO[Window(Home).Property(milionar.accent.text)]">OverlayWatched.png</texture>
					<visible>String.IsEqual(Window.Property(ac.status.kind),ok)</visible>
				</control>
				<control type="label">
					<width min="10" max="940">auto</width>
					<height>48</height>
					<font>font13</font>
					<aligny>center</aligny>
					<label>$INFO[Window.Property(ac.status)]</label>
					<visible>!String.IsEqual(Window.Property(ac.status.kind),error)</visible>
				</control>
				<control type="label">
					<width min="10" max="940">auto</width>
					<height>48</height>
					<font>font13</font>
					<aligny>center</aligny>
					<textcolor>red</textcolor>
					<label>$INFO[Window.Property(ac.status)]</label>
					<visible>String.IsEqual(Window.Property(ac.status.kind),error)</visible>
				</control>
			</control>
			<control type="grouplist" id="9000">
				<top>530</top>
				<width>1000</width>
				<height>64</height>
				<orientation>horizontal</orientation>
				<itemgap>20</itemgap>
				<onup>noop</onup>
				<ondown>noop</ondown>
				<onleft>noop</onleft>
				<onright>noop</onright>
				<control type="button" id="11">
					<width min="240" max="560">auto</width>
					<height>64</height>
					<font>font12</font>
					<align>center</align>
					<aligny>center</aligny>
					<textoffsetx>40</textoffsetx>
					<textcolor>white</textcolor>
					<focusedcolor>$INFO[Window(Home).Property(milionar.accent.ink)]</focusedcolor>
					<texturefocus border="20" colordiffuse="$INFO[Window(Home).Property(milionar.accent.fill)]">milionar/cinema/button.png</texturefocus>
					<texturenofocus border="20">milionar/cinema/button_ghost.png</texturenofocus>
					<label>$INFO[Window.Property(ac.b1)]</label>
					<visible>!String.IsEmpty(Window.Property(ac.b1))</visible>
				</control>
				<control type="button" id="12">
					<width min="240" max="560">auto</width>
					<height>64</height>
					<font>font12</font>
					<align>center</align>
					<aligny>center</aligny>
					<textoffsetx>40</textoffsetx>
					<textcolor>white</textcolor>
					<focusedcolor>$INFO[Window(Home).Property(milionar.accent.ink)]</focusedcolor>
					<texturefocus border="20" colordiffuse="$INFO[Window(Home).Property(milionar.accent.fill)]">milionar/cinema/button.png</texturefocus>
					<texturenofocus border="20">milionar/cinema/button_ghost.png</texturenofocus>
					<label>$INFO[Window.Property(ac.b2)]</label>
					<visible>!String.IsEmpty(Window.Property(ac.b2))</visible>
				</control>
			</control>
		</control>

		<!-- the QR code, the code and the address -->
		<control type="group">
			<left>1220</left>
			<top>200</top>
			<visible>!String.IsEmpty(Window.Property(ac.qr))</visible>
			<control type="image">
				<width>560</width>
				<height>700</height>
				<texture border="24" colordiffuse="DDFFFFFF">milionar/cinema/button.png</texture>
			</control>
			<control type="image">
				<left>60</left>
				<top>40</top>
				<width>440</width>
				<height>440</height>
				<aspectratio>keep</aspectratio>
				<texture background="true">$INFO[Window.Property(ac.qr)]</texture>
			</control>
			<control type="label">
				<top>500</top>
				<width>560</width>
				<height>90</height>
				<font>font45_title</font>
				<align>center</align>
				<aligny>center</aligny>
				<textcolor>FF101418</textcolor>
				<label>$INFO[Window.Property(ac.code)]</label>
			</control>
			<control type="textbox">
				<left>30</left>
				<top>590</top>
				<width>500</width>
				<height>90</height>
				<font>font12</font>
				<align>center</align>
				<textcolor>FF333B44</textcolor>
				<label>$INFO[Window.Property(ac.url)]</label>
			</control>
		</control>
	</controls>
</window>
