<?php

namespace Dashboard\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Dashboard\Form\{FaremanagementFareSearchForm , FareManagementAddSearchForm , FaremanagementAddpriceBasic , FaremanagementAddpriceCommonForm , FaremanagementAddpriceDistanceForm
, FaremanagementAddpriceDistanceHourForm , FaremanagementAddpriceFixedRoutesForm , FaremanagementAddpriceHourForm , FaremanagementAddpricePackageCalculation , FaremanagementAddpricePremiumForm,
FaremanagementAddpriceShareForm };


class GuideFareController extends AbstractActionController {

    /**
     * 
     * @return ViewModel
     */
    public function indexAction(){
        //write code here...
         $state = [
            '1'=>'Delhi',
            '2'=>'UP',
            '3'=>'Haryana', 
        ];        
        FaremanagementFareSearchForm::$state = $state;
     
        $city = [
            '1'=>'New delhi',
            '2'=>'noida',
            '3'=>'Ghaziabad', 
        ];
        FaremanagementFareSearchForm::$city = $city;
        
        
        $booking_type= [
            '1'=>'Local',
            '2'=>'Point to Point',
            '3'=>'Airport Transfer', 
            '4'=>'Outstation', 
            '5'=>'Intercity', 
        ];
        FaremanagementFareSearchForm::$booking_type = $booking_type;
        
        $cab_type = [
            '1'=>'Economy',
            '2'=>'Sedan',
            '3'=>'Prime', 
        ];
        FaremanagementFareSearchForm::$cab_type = $cab_type;
        
        $form = new FaremanagementFareSearchForm();
        
        
       $guidefareListing = [
            '0'=>[
                'car_type'=>'economy',
                'booking_type'=>'Local',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Local',
                'status'=>'Active',
                
            ],
            '1'=>[
                'car_type'=>'Prime',
                'booking_type'=>'Point To Point',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Point To point',
                'status'=>'Active',
            ]
            
        ];
        $viewModel = new ViewModel(['form'=>$form,'guidefareListing'=>$guidefareListing]);
        return $viewModel;
    } 
    /**
     * 
     * @return ViewModel
     */
    public function addPriceBasicAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    
    public function addPriceBasicVehicleAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    /**
     * 
     * @return ViewModel
     */
    public function addPriceCommonAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }

    /**
     * 
     * @return ViewModel
     */
    public function addPriceDistanceHourAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPriceDistanceWaitingAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPriceDistanceAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPriceFixedRoutesAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPriceHourAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPriceOptionsAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPricePackageCalculationAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }

    /**
     * 
     * @return ViewModel
     */
    public function addPricePremiumAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addPriceShareAction(){
        
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
    /**
     * 
     * @return ViewModel
     */
    public function addSearchAction(){
        
        $country = [
            '1'=>'Select country',
            '2'=>'India',
            '3'=>'America', 
        ];        
        FareManagementAddSearchForm::$country = $country;
      
        $city = [
            '1'=>'New delhi',
            '2'=>'noida',
            '3'=>'Ghaziabad', 
        ];
        FareManagementAddSearchForm::$city = $city;
        
        $booking_type= [
            '1'=>'Local',
            '2'=>'Point to Point',
            '3'=>'Airport Transfer', 
            '4'=>'Outstation', 
            '5'=>'Intercity', 
        ];
        FareManagementAddSearchForm::$booking_type = $booking_type;
        
        $cab_type = [
            '1'=>'Economy',
            '2'=>'Sedan',
            '3'=>'Prime', 
        ];
        FareManagementAddSearchForm::$cab_type = $cab_type;
        
        $form = new FareManagementAddSearchForm();
        $viewModel = new ViewModel(['form'=>$form]);
        $viewModel->setTerminal(true);
        return $viewModel;
    } 
    
    /**
     * 
     * @return ViewModel
     */
    public function middleLinksAction(){
        
        $viewModel = new ViewModel();
        return $viewModel;
    }    
    
    /**
     * 
     * @return ViewModel
     */
    public function viewUpdateRecordsAction(){
        
        $viewModel = new ViewModel();
        return $viewModel;
    }
    
    public function searchCabFareAction(){
        
        
        $guidefareListing = [
            '0'=>[
                'car_type'=>'economy',
                'booking_type'=>'Local',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Local',
                'status'=>'Active',
                
            ],
            '1'=>[
                'car_type'=>'Prime',
                'booking_type'=>'Point To Point',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Point To point',
                'status'=>'Active',
            ],
            '2'=>[
                'car_type'=>'Prime',
                'booking_type'=>'Point To Point',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Point To point',
                'status'=>'Active',
            ],
            '3'=>[
                'car_type'=>'Prime',
                'booking_type'=>'Point To Point',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Point To point',
                'status'=>'Active',
            ],
            '4'=>[
                'car_type'=>'Prime',
                'booking_type'=>'Point To Point',
                'state_name'=>'Delhi',
                'city_name'=>'New Delhi',
                'price_km'=>'100/5 km',
                'beyond_km'=>'10/km',
                'charges_min'=>'01/min',
                'type_of_dispatch' =>'Point To point',
                'status'=>'Active',
            ]
            
        ];
        
        $viewModel = new ViewModel(['guidefareListing' =>$guidefareListing]);        
        $viewModel->setTemplate('/dashboard/guide-fare/guide-fare-listing');
        $viewModel->setTerminal(true);
        return $viewModel;
    }
    
}
