<?php
/**
 * Listing Options - Image Effect
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

if( !class_exists( 'Vouge_Woo_Listing_Option_Hover_Secondary_Image_Effect' ) ) {

    class Vouge_Woo_Listing_Option_Hover_Secondary_Image_Effect extends Vouge_Woo_Listing_Option_Core {

        private static $_instance = null;

        public $option_slug;

        public $option_name;

        public $option_type;

        public $option_default_value;

        public $option_value_prefix;

        public static function instance() {

            if ( is_null( self::$_instance ) ) {
                self::$_instance = new self();
            }

            return self::$_instance;
        }

        function __construct() {

            $this->option_slug          = 'product-hover-secondary-image-effect';
            $this->option_name          = esc_html__('Hover Secondary Image Effect', 'vouge');
            $this->option_default_value = 'product-hover-secimage-fade';
            $this->option_type          = array ( 'class', 'value-css' );
            $this->option_value_prefix  = 'product-hover-';

            $this->render_backend();
        }

        /**
         * Backend Render
         */
        function render_backend() {
            add_filter( 'vouge_woo_custom_product_template_hover_options', array( $this, 'woo_custom_product_template_hover_options'), 15, 1 );
        }

        /**
         * Custom Product Templates - Options
         */
        function woo_custom_product_template_hover_options( $template_options ) {

            array_push( $template_options, $this->setting_args() );

            return $template_options;
        }

        /**
         * Settings Group
         */
        function setting_group() {
            return 'hover';
        }

        /**
         * Setting Args
         */
        function setting_args() {
            $settings            =  array ();
            $settings['id']      =  $this->option_slug;
            $settings['type']    =  'select';
            $settings['title']   =  $this->option_name;
            $settings['options'] =  array (
                'product-hover-secimage-fade'         => esc_html__('Fade', 'vouge'),
                'product-hover-secimage-zoomin'       => esc_html__('Zoom In', 'vouge'),
                'product-hover-secimage-zoomout'      => esc_html__('Zoom Out', 'vouge'),
                'product-hover-secimage-zoomoutup'    => esc_html__('Zoom Out Up', 'vouge'),
                'product-hover-secimage-zoomoutdown'  => esc_html__('Zoom Out Down', 'vouge'),
                'product-hover-secimage-zoomoutleft'  => esc_html__('Zoom Out Left', 'vouge'),
                'product-hover-secimage-zoomoutright' => esc_html__('Zoom Out Right', 'vouge'),
                'product-hover-secimage-pushup'       => esc_html__('Push Up', 'vouge'),
                'product-hover-secimage-pushdown'     => esc_html__('Push Down', 'vouge'),
                'product-hover-secimage-pushleft'     => esc_html__('Push Left', 'vouge'),
                'product-hover-secimage-pushright'    => esc_html__('Push Right', 'vouge'),
                'product-hover-secimage-slideup'      => esc_html__('Slide Up', 'vouge'),
                'product-hover-secimage-slidedown'    => esc_html__('Slide Down', 'vouge'),
                'product-hover-secimage-slideleft'    => esc_html__('Slide Left', 'vouge'),
                'product-hover-secimage-slideright'   => esc_html__('Slide Right', 'vouge'),
                'product-hover-secimage-hingeup'      => esc_html__('Hinge Up', 'vouge'),
                'product-hover-secimage-hingedown'    => esc_html__('Hinge Down', 'vouge'),
                'product-hover-secimage-hingeleft'    => esc_html__('Hinge Left', 'vouge'),
                'product-hover-secimage-hingeright'   => esc_html__('Hinge Right', 'vouge'),
                'product-hover-secimage-foldup'       => esc_html__('Fold Up', 'vouge'),
                'product-hover-secimage-folddown'     => esc_html__('Fold Down', 'vouge'),
                'product-hover-secimage-foldleft'     => esc_html__('Fold Left', 'vouge'),
                'product-hover-secimage-foldright'    => esc_html__('Fold Right', 'vouge'),
                'product-hover-secimage-fliphoriz'    => esc_html__('Flip Horizontal', 'vouge'),
                'product-hover-secimage-flipvert'     => esc_html__('Flip Vertical', 'vouge')
            );
            $settings['default'] =  $this->option_default_value;

            return $settings;
        }
    }

}

if( !function_exists('vouge_woo_listing_option_hover_secondary_image_effect') ) {
	function vouge_woo_listing_option_hover_secondary_image_effect() {
		return Vouge_Woo_Listing_Option_Hover_Secondary_Image_Effect::instance();
	}
}

vouge_woo_listing_option_hover_secondary_image_effect();