<scenario begin="load">
    
    <screen type="Void" id="load">
        <actions>
            <action type="Next">
                <set key="#8oz" key-title="RETETAR 8oz" value="file://8oz.html"/>
                <set key="#12oz" key-title="RETETAR 12oz" value="file://12oz.html"/>
                <set key="#certification" key-title="CERTIFICARI" value="file://certification.html"/>
                <goto target="list"/>
            </action>
        </actions>
    </screen>

    <screen type="selector/button" title="RETETARE SI CERTIFICARI" id="list">
        <fields>
            <selector-field id="type">
                <items type="static">
                    <item value="1" title="&lt;html&gt;&lt;b&gt;&lt;center&gt;RETETAR&lt;div&gt;8oz&lt;/div&gt;"/>
                    <item value="2" title="&lt;html&gt;&lt;b&gt;&lt;center&gt;RETETAR&lt;div&gt;12oz&lt;/div&gt;"/>
                    <item value="3" title="CERTIFICARI"/>
                </items>
            </selector-field>
        </fields>
        <actions>
            <action type="Next" title="INAINTE">
                <if condition="type == 1"> 
                    <then>
                        <clear keys="type"/>
                        <goto target="8oz"/>
                        <cancel/>
                    </then>
                        
                </if>
                <if condition="type == 2"> 
                    <then>
                        <clear keys="type"/>
                        <goto target="12oz"/>
                        <cancel/>
                    </then>
                        
                </if>
                <if condition="type == 3"> 
                    <then>
                        <clear keys="type"/>
                        <goto target="certification"/>
                        <cancel/>
                    </then>
                        
                </if>
                <dialog type="Info" title="Error" message="Retetarele sunt momentan indisponibile" timeout="10" default="okay">
                    <actions>
                        <action type="okay" title="OK">
                            <cancel/>
                        </action>                                            
                    </actions>
                </dialog>
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="previos"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>            
        </actions>
    </screen>
    
    <screen type="info" title="RETETAR 8oz" id="8oz">
        <field key="#8oz"/>
        <actions>
            <action type="Prev" title="INAPOI">
                <goto target="load"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>   
        </actions>
    </screen>
    
    <screen type="info" title="RETETAR 12oz" id="12oz">
        <field key="#12oz"/>
        <actions>
            <action type="Prev" title="INAPOI">
                <goto target="load"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>   
        </actions>
    </screen>
    
    <screen type="info" title="CERTIFICARI" id="certification">
        <field key="#certification"/>
        <actions>
            <action type="Prev" title="INAPOI">
                <goto target="load"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>   
        </actions>
    </screen>
    
</scenario>