<?php
class fSliderManagerSliderBasicObject {
	protected $sliderDataObject = null;
	protected $customOptions = null;
	public $transitions = null;
	
	public function __construct( $sliderDataObject = null ) {
		$this->customOptions = new fThemeOptionsStore();
		$this->addBasicSliderOptions();
		if ( $sliderDataObject != null )
			$this->setSliderDataObject( $sliderDataObject );
	}
	
	private function addBasicSliderOptions() {
		$slider_types = array( array('name' => 'Default', 'value'=> 'Default'),array('name'=>'Freshcubes', 'value'=>'freshcubes'));
		$opt = $this->customOptions;
		$opt->startNamespace('slider_options', 'slider_options', 'Slider Options');
			$opt->startOption('Slider Type', '');
				$opt->addParameterNL('select', 'slider_type', 'fSliderManagerSliderAccordeon', ' Slider Type', $slider_types);
			$opt->startOption('Slider Options', '');
				$opt->addParameter('check', 'slider-autoslide-enable', 1, ' enable Auto-Sliding with delay of ');
				$opt->addParameterNL('text', 'slider-autoslide-interval', '5000', ' milliseconds between each slide ');/// $opt->addParameterNL('text', 'slider-height', '400', ' Slider Height in pixels');
	
	}
	
	
	protected function addTransition( $name, $value ) {
		$this->transitions[ $name ] = $value;
	}
	
	public function setSliderDataObject( $name ) {	
		$sdm = new fSliderManagerDataManager();
		$data_object = $sdm->getSlider( $name );
		
		if( $data_object == null ) return false;
		
		$this->sliderDataObject = $data_object;
		
		
	}
	public function getOptions() { return $this->customOptions; }
	
	public function addSlide( fSliderManagerSlide $slide_to_add ) {
		$this->sliderDataObject->addSlide( $slide_to_add );
	}
	
	public function getSlides() {
		return $this->sliderDataObject->slides;
	}
	
	public function getSliderDataObject() {
		return $this->sliderDataObject;
	}
}

class fSliderManagerSliderFreshcubesObject extends  fSliderManagerSliderBasicObject {
	public function __construct(){
		parent::__construct();
		$this->addCustomSliderOptions();
	}
	private function addCustomSliderOptions() {
		$opt = $this->customOptions;
		$this->customOptions = $opt;
		$this->addTransition('Random', 'random');
		$this->addTransition('Basic', 'basic');
		$this->addTransition('Fly', 'fly');
		$this->addTransition('Fly Back', 'flyback');
		$this->addTransition('Lines', 'lines');
		$this->addTransition('Lcp', 'lcp');
		$this->addTransition('Column', 'column');
	}
}

class fSLiderManagerSliderDefaultObject extends  fSliderManagerSliderBasicObject {
	public function __construct(){
		parent::__construct();
		$this->addCustomSliderOptions();
	}
	private function addCustomSliderOptions() {
		$opt = $this->customOptions;		
		$this->customOptions = $opt;
	}
}

class fSLiderManagerSliderAccordeonObject extends  fSliderManagerSliderBasicObject {
	public function __construct(){
		parent::__construct();
		$this->addCustomSliderOptions();
	}
	private function addCustomSliderOptions() {
		$opt = $this->customOptions;
		$this->customOptions = $opt;
	}
}

?>