<scenario begin="select">
	
    <screen type="selector/currency" title="SELECTATI VALOAREA DORITA" id="select" sound="select_nominal.mp3">
        <fields>
            <selector-field id="id2" title="Nominal">
                <items type="static">
                    <item value="0300" title="START 3 €" sum="3"/>
                    <item value="0500" title="MINI 5 €" sum="5"/>
                    <item value="0600" title="SUPER 6 €" sum="6"/>
                    <item value="0700" title="MEGA 7 €" sum="7"/>
                    <item value="0800" title="ULTRA 8 €" sum="8"/>                      
                </items>
            </selector-field>
        </fields>
        <actions>
            <action type="Next" title="INAINTE">
                <if condition="id2 == 0300"> 
                    <then>
						<set key="#bundle_info" key-title="bundle_info" value="file://lyca/start.html" />
						<goto target="select_info"/>
                        <cancel/>
                    </then>  
                </if>
                <if condition="id2 == 0500"> 
                    <then>
						<set key="#bundle_info" key-title="bundle_info" value="file://lyca/mini.html" />
						<goto target="select_info"/>
                        <cancel/>
                    </then>  
                </if>
                <if condition="id2 == 0600"> 
                    <then>
						<set key="#bundle_info" key-title="bundle_info" value="file://lyca/super.html" />
						<goto target="select_info"/>
                        <cancel/>
                    </then>   
                </if>
                <if condition="id2 == 0700"> 
                    <then>
						<set key="#bundle_info" key-title="bundle_info" value="file://lyca/mega.html" />
						<goto target="select_info"/>
                        <cancel/>
                    </then>   
                </if>
                <if condition="id2 == 0800"> 
                    <then>
						<set key="#bundle_info" key-title="bundle_info" value="file://lyca/ultra.html" />
						<goto target="select_info"/>
                        <cancel/>
                    </then>  
                </if>
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="previous"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
            <action type="Edit" title="lyca_regular.png;0x0EB14E">
                <redirect target="70" params="menu-item"/>
                <cancel/>
            </action>
        </actions>
    </screen>
	
	<screen type="info" id="select_info" title="DETALII PACHET" sound="validate_phone.mp3">
		<field key="#bundle_info" />
		<actions>
            <action type="Next" title="INAINTE">
                <set key="id1" key-title="Produs" value="bundle" value-title="Pachet cu optiuni"/>
                <online-request type="default" function="verify" params="id1,id2">
                    <actions>
                        <action type="success">
                            <goto target="pay"/>
                        </action>
                        <action type="error">
                            <dialog type="Info" title="Error" message="Nu exista PIN-uri disponibile pentru acesta valoare" timeout="10" default="okay">
                                <actions>
                                    <action type="okay" title="OK">
                                        <goto target="select"/>
                                    </action>                                            
                                </actions>
                            </dialog>                            
                        </action>
                        <action type="exception">
                            <dialog type="Info" title="Error" message="Nu exista conexiune cu serverul" timeout="10" default="okay">
                                <actions>
                                    <action type="okay" title="OK">
                                        <cancel/>
                                    </action>                                            
                                </actions>
                            </dialog>
                        </action>
                    </actions>
                </online-request>               
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="select"/>
				<clear keys="#bundle_info,id1,id2"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
				<clear keys="#bundle_info,id1,id2"/>
            </action>
        </actions>
	</screen>

    <screen type="Sum" sum="sum-trade"/>
    
</scenario>