<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:rrinvisservice="services.rrinvisservice.*" width="1148" height="792" xmlns:ns1="*" viewSourceURL="srcview/index.html" xmlns:uiImpersonation="org.fluint.uiImpersonation.*">
    <s:layout>
        <s:BasicLayout/>
    </s:layout>
    <fx:Script>
        <![CDATA[
            import mx.charts.events.ChartEvent;
            import mx.events.FlexEvent;
            import mx.controls.Alert;

            protected function columnchart1_creationCompleteHandler(event:FlexEvent):void
            {
                getAllRrinvisResult.token = rrinvisService.getAllRrinvis();
            }


            protected function columnchart1_chartClickHandler(event:ChartEvent):void
            {
            
            }

        ]]>
    </fx:Script>
    <s:states>
        <s:State name="State1"/>
        <s:State name="state2"/>
    </s:states>
    <fx:Declarations>
        <s:CallResponder id="getAllRrinvisResult"/>
        <rrinvisservice:RrinvisService id="rrinvisService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:TabNavigator x="50.7" y="132.35" width="870" height="492" baseColor="#F0870C" color="#131312" focusColor="#BA9650" fontFamily="Verdana" backgroundColor="#F6E2AC">
        <s:NavigatorContent label="Dashboard" width="100%" height="100%" fontSize="13">
            <mx:ColumnChart x="10" y="67" id="columnchart1" creationComplete="columnchart1_creationCompleteHandler(event)" dataProvider="{getAllRrinvisResult.lastResult}" showDataTips="true" height="355" includeIn="State1" mouseDownEffect="goto state2" type="clustered" chartClick="columnchart1_chartClickHandler(event)">
                <mx:series>
                    <mx:ColumnSeries displayName="Series 1" yField="amount" id="columnSeries"/>
                </mx:series>
                <mx:horizontalAxis>
                    <mx:CategoryAxis id="categoryAxis"/>
                </mx:horizontalAxis>
            </mx:ColumnChart>
            <mx:Legend dataProvider="{columnchart1}" includeIn="State1"/>
        </s:NavigatorContent>
        <s:NavigatorContent label="Reports" width="100%" height="100%">
        </s:NavigatorContent>
        <s:NavigatorContent label="Recipes" width="100%" height="100%">
        </s:NavigatorContent>
        <s:NavigatorContent label="Cost of Sales" width="100%" height="100%">
            <mx:DateChooser x="43" y="10" id='dateChooser' width="232" height="155" fontSize="12"/>
            <s:Label x="295" y="30" text="Date Picked: {dateChooser.selectedDate.toDateString()} "/>
        </s:NavigatorContent>
        <s:NavigatorContent label="Budget" width="100%" height="100%">
        </s:NavigatorContent>
        <s:NavigatorContent label="Labor" width="100%" height="100%">
        </s:NavigatorContent>
        
        <s:NavigatorContent label="Daily Profit and Loss" width="100%" height="100%">
        </s:NavigatorContent>
        <s:NavigatorContent label="Shift Report" width="100%" height="100%">
            <s:TextInput x="128" y="72"/>
            <s:TextArea x="98.3" y="119.65" width="191" height="157"/>
            <s:Button x="107" y="378" label="Button"/>
        </s:NavigatorContent>
    </mx:TabNavigator>
    <ns1:MyClass1 x="755" y="10" width="38"/>
    <uiImpersonation:TestEnvironment includeIn="State1" x="354" y="85">
    </uiImpersonation:TestEnvironment>
</s:Application>