package com.afi.estimator.model
{
    import com.afi.estimator.log.Logger;
    import com.afi.estimator.views.pages.*;
    import com.afi.estimator.views.shell.background;
    import com.afi.estimator.views.vo.PageVO;
    import com.sharewithagent.ShareMain;

   // import com.sharewithagent.ShareMain;

    public class PagesModel
    {
        public static var instance:PagesModel;
        public static var shareMain:ShareMain;
        public static const SCROLL_RIGHT:int = 1;
        public static const SCROLL_LEFT:int = -1;
        
        public static var bg:background;
        public static var pages:Array = new Array(
            new PageVO('welcome', WelcomePage, ''),
            new PageVO('why', Features, 'education'),
            new PageVO('whyApplyNow', WhyApplyNow, 'education'),
            new PageVO('calculate', CalculateForm, 'calculate'),
            new PageVO('premiumResults', Results, 'results'),
            new PageVO('contactPage', ContactsPage, 'send'),
            new PageVO('sendToAgent', ShareWithAgent, 'send')
            /*new PageVO('Thank You', ThankYouPage,'send')*/
        );
        
        public function PagesModel()
        {
            Logger.log("Pages Model Created");
            PagesModel.instance = this;
        }
        
        public static function getIndexByVO(v:PageVO):uint {
            var ret:uint = 0;
            for(var i:uint=0; i<PagesModel.pages.length; i++) {
                if(PagesModel.pages[i] == v) {
                    ret = i;
                }
            }
            return ret;
        }
        
    }
}