<?xml version="1.0" encoding="utf-8"?>
<!--

////////////////////////////////////////////////////////////////////////////////
//
//    Copyright 2014 Ardisia Labs LLC. All Rights Reserved.
//
//    This file is licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////

-->
<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" 
          xmlns:s="library://ns.adobe.com/flex/spark" 
          xmlns:mx="library://ns.adobe.com/flex/mx"
          xmlns:containers="containers.*"
          xmlns:data="containers.data.*"
          xmlns:separators="ardisia.components.separators.*"
          xmlns:iCalendarRecurrence="components.iCalendarRecurrence.*"
          frameRate="60"
          width="100%" height="100%"
          removedFromStage="removedFromStageHandler(event)">
    
    <!-- scripts -->
    <fx:Script>
        <![CDATA[
            
            //--------------------------------------
            //  methods
            //--------------------------------------
            
            public function creationComplete():void
            {
                
            }
            
            //--------------------------------------
            //  event handlers
            //--------------------------------------
            
            protected function removedFromStageHandler(event:Event):void
            {
                
            }
            
        ]]>
    </fx:Script>
    
    <!-- declarations -->
    <fx:Declarations>
        
    </fx:Declarations>
    
    <!-- states -->
    <s:states>
        <s:State name="stockholm" />
        <s:State name="london" />
        <s:State name="spark" />
    </s:states>
    
    <!-- application -->
    <containers:DemoApplicationWrapper id="demoAppWrapper" 
                                       width="100%" height="100%"
                                       westRegionTitle="iCalendarRecurrence Description"
                                       description="The iCalendarRecurrence class generates and returns an array of Date objects based on recurrence properties.&#13;&#13;Follows the iCalendar specification located at &#13;http://tools.ietf.org/html/rfc5545."
                                       currentState.stockholm="stockholm" currentState.london="london" currentState.spark="spark">
        
        <containers:expandingContainerContent>
            
            <!--- expanding container #1 -->
            <data:ExpandingContainerData>
                <data:label>Sample Recurring Dates</data:label>
                <data:content>
                    <s:Label width="250" 
                             text="Below are some interesting recurring holidays from around the world.&#13;&#13;Try setting them up in the example to the right and generate what days they will occur in the coming years." />
                    <s:RichText height="100%">
                        <s:content>
                            <s:p> </s:p>
                            <s:p fontWeight="bold">Martin Luther King Jr. Day (USA)</s:p>
                            <s:p>3rd Monday in January</s:p>
                            <s:p> </s:p>
                            <s:p fontWeight="bold">Mother's Day (France &amp; Sweden)</s:p>
                            <s:p>Last Monday in May</s:p>
                            <s:p> </s:p>
                            <s:p fontWeight="bold">Mother's Day (Norway)</s:p>
                            <s:p>2nd Sunday in February</s:p>
                            <s:p> </s:p>
                            <s:p fontWeight="bold">Father's Day (Japan)</s:p>
                            <s:p>3rd Sunday in June</s:p>
                            <s:p> </s:p>
                            <s:p fontWeight="bold">Thanksgiving (USA)</s:p>
                            <s:p>4th Thursday in November</s:p>
                            <s:p> </s:p>
                            <s:p fontWeight="bold">Leap Year</s:p>
                            <s:p>Typically every 4 years; Feb 29, 2012, 2016, etc. </s:p>
                        </s:content>
                    </s:RichText>
                </data:content>
            </data:ExpandingContainerData>
            
        </containers:expandingContainerContent>
        
        <containers:centerContent>
            
            <!--- example #1 -->
            <data:PrimaryContentData>
                <data:tabLabel>Example</data:tabLabel>
                <data:exampleDescription>Use the form below to create recurring dates based on the provided recurrence properties.</data:exampleDescription>
                <data:primaryContent>
                    <iCalendarRecurrence:iCalendarRecurrenceForm horizontalCenter="0" verticalCenter="0"/>
                </data:primaryContent>
            </data:PrimaryContentData>
            
        </containers:centerContent>
        
    </containers:DemoApplicationWrapper>
    
</s:Module>