<?php

namespace OXI_IMAGE_HOVER_PLUGINS\Modules\Square;

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Description of Modules
 *
 * @author biplo
 */
use OXI_IMAGE_HOVER_PLUGINS\Page\Admin_Render as Admin_Render;
use OXI_IMAGE_HOVER_PLUGINS\Classes\Controls as Controls;

class Modules extends Admin_Render {

    use \OXI_IMAGE_HOVER_PLUGINS\Modules\Dynamic;

    public $StyleChanger = [
        'Square-1',
        'Square-2',
        'Square-3',
        'Square-4',
        'Square-5',
        'Square-6',
        'Square-7',
        'Square-8',
        'Square-9',
        'Square-10',
        'Square-11',
        'Square-12',
        'Square-13',
        'Square-14',
        'Square-15',
        'Square-16',
        'Square-17',
        'Square-18',
        'Square-19',
        'Square-20',
        'Square-21',
        'Square-22',
    ];

    public function register_effects() {
        return '';
    }

    public function register_effects_time() {
        $this->add_control(
                'oxi-image-hover-effects-time',
                $this->style,
                [
                    'label' => esc_html__('Effects Time (S)', 'image-hover-effects-ultimate'),
                    'type' => Controls::SLIDER,
                    'simpleenable' => false,
                    'default' => [
                        'unit' => 'ms',
                        'size' => '',
                    ],
                    'range' => [
                        'ms' => [
                            'min' => 0.0,
                            'max' => 5000,
                            'step' => 1,
                        ],
                        's' => [
                            'min' => 0.0,
                            'max' => 5,
                            'step' => 0.01,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-style *,{{WRAPPER}} .oxi-image-hover-style *:before,{{WRAPPER}} .oxi-image-hover-style *:after' => '-webkit-transition: all {{SIZE}}{{UNIT}} ease-in-out; -moz-transition: all {{SIZE}}{{UNIT}} ease-in-out; transition: all {{SIZE}}{{UNIT}} ease-in-out;',
                    ],
                    'simpledescription' => '',
                    'description' => 'Set Effects Durations as How long you want to run Effects. Options available with Second or Milisecond.',
                ]
        );
    }

    public function register_column_effects() {
        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Column & Effects', 'image-hover-effects-ultimate'),
                    'showing' => TRUE,
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-col',
                $this->style,
                [
                    'type' => Controls::COLUMN,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-style' => '',
                    ],
                    'simpledescription' => 'How much column want to show into a single rows ',
                    'description' => 'Define how much column you want to show into single rows. Customize possible with desktop or tab or mobile Settings.',
                ]
        );
        $this->register_effects();
        $this->register_effects_time();
        $this->add_group_control(
                'oxi-image-hover-animation',
                $this->style,
                [
                    'type' => Controls::ANIMATION,
                    'separator' => TRUE,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-style' => '',
                    ]
                ]
        );

        $this->end_controls_section();
    }

    public function register_general_style() {
        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Width & Height', 'image-hover-effects-ultimate'),
                    'showing' => true,
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-width',
                $this->style,
                [
                    'label' => esc_html__('Width', 'image-hover-effects-ultimate'),
                    'type' => Controls::SLIDER,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 1900,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 1,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 1,
                            'max' => 200,
                            'step' => 0.1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-style-square' => 'max-width:{{SIZE}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Customize Image Width as like as you want, will be pixel Value.',
                    'description' => 'Customize Image Width with several options as Pixel, Percent or EM.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-height',
                $this->style,
                [
                    'label' => esc_html__('Height', 'image-hover-effects-ultimate'),
                    'type' => Controls::SLIDER,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 1000,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 1,
                            'max' => 200,
                            'step' => 1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-style-square:after ' => 'padding-bottom:{{SIZE}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Customize Image Height as like as you want, will be Percent Value.',
                    'description' => 'Customize Image Height with several options as Pixel, Percent or EM.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-margin',
                $this->style,
                [
                    'label' => esc_html__('Margin', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 200,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-style' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Margin properties are used to create space around Image.',
                    'description' => 'Margin properties are used to create space around Image with several options as Pixel, or Percent or EM.',
                ]
        );
        $this->end_controls_section();
    }

    public function register_content_settings() {
        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Content Settings', 'image-hover-effects-ultimate'),
                    'showing' => TRUE,
                ]
        );
        $this->add_control(
                'oxi-image-hover-background-color', $this->style, [
            'label' => esc_html__('Background', 'image-hover-effects-ultimate'),
            'type' => Controls::GRADIENT,
            'default' => 'rgba(255, 116, 3, 1)',
            'selector' => [
                '{{WRAPPER}} .oxi-image-hover-caption-tab' => 'background:{{VALUE}};',
            ],
            'simpledescription' => 'Customize Hover Background with transparent options.',
            'description' => 'Customize Hover Background with Color or Gradient or Image properties.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-content-alignment',
                $this->style,
                [
                    'label' => esc_html__('Content Alignment', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => 'image-hover-align-center-center',
                    'options' => [
                        'image-hover-align-top-left' => esc_html__('Top Left', 'image-hover-effects-ultimate'),
                        'image-hover-align-top-center' => esc_html__('Top Center', 'image-hover-effects-ultimate'),
                        'image-hover-align-top-right' => esc_html__('Top Right', 'image-hover-effects-ultimate'),
                        'image-hover-align-center-left' => esc_html__('Center Left', 'image-hover-effects-ultimate'),
                        'image-hover-align-center-center' => esc_html__('Center Center', 'image-hover-effects-ultimate'),
                        'image-hover-align-center-right' => esc_html__('Center Right', 'image-hover-effects-ultimate'),
                        'image-hover-align-bottom-left' => esc_html__('Bottom Left', 'image-hover-effects-ultimate'),
                        'image-hover-align-bottom-center' => esc_html__('Bottom Center', 'image-hover-effects-ultimate'),
                        'image-hover-align-bottom-right' => esc_html__('Bottom Right', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab' => '',
                    ],
                    'simpledescription' => 'Customize Content Aginment as Top, Bottom, Left or Center.',
                    'description' => 'Customize Content Aginment as Top, Bottom, Left or Center.',
                ]
        );
        $this->start_controls_tabs(
                'image-hover-content-start-tabs',
                [
                    'options' => [
                        'normal' => esc_html__('Normal ', 'image-hover-effects-ultimate'),
                        'hover' => esc_html__('Hover ', 'image-hover-effects-ultimate'),
                    ]
                ]
        );
        $this->start_controls_tab();
        $this->add_responsive_control(
                'oxi-image-hover-border-radius',
                $this->style,
                [
                    'label' => esc_html__('Border Radius', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 50,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure,'
                        . '{{WRAPPER}} .oxi-image-hover-figure:before,'
                        . '{{WRAPPER}} .oxi-image-hover-image,'
                        . '{{WRAPPER}} .oxi-image-hover-image:before,'
                        . '{{WRAPPER}} .oxi-image-hover-image img,'
                        . '{{WRAPPER}} .oxi-image-hover-figure-caption,'
                        . '{{WRAPPER}} .oxi-image-hover-figure-caption:before,'
                        . '{{WRAPPER}} .oxi-image-hover-figure-caption:after,'
                        . '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-caption-tab' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Allows you to add rounded corners to Image with options.',
                    'description' => 'Allows you to add rounded corners to Image with options.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-boxshadow',
                $this->style,
                [
                    'type' => Controls::BOXSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-image:before' => '',
                    ],
                    'description' => 'Box Shadow property attaches one or more shadows into Image shape.',
                ]
        );
        $this->end_controls_tab();
        $this->start_controls_tab();
        $this->add_responsive_control(
                'oxi-image-hover-hover-border-radius',
                $this->style,
                [
                    'label' => esc_html__('Border Radius', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 50,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure,'
                        . '{{WRAPPER}} .oxi-image-hover:hover  .oxi-image-hover-figure:before,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch  .oxi-image-hover-figure:before,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-image,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-image,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-image:before,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-image:before,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-image img,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-image img,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-figure-caption,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-figure-caption,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-figure-caption:before,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-figure-caption:before,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-figure-caption:after,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-figure-caption:after,'
                        . '{{WRAPPER}} .oxi-image-hover:hover .oxi-image-hover-figure .oxi-image-hover-figure-caption .oxi-image-hover-caption-tab,'
                        . '{{WRAPPER}} .oxi-image-hover.oxi-touch .oxi-image-hover-figure .oxi-image-hover-figure-caption .oxi-image-hover-caption-tab' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Allows you to add rounded corners at Hover to Image with options.',
                    'description' => 'Allows you to add rounded corners at Hover to Image with options.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-hover-boxshadow',
                $this->style,
                [
                    'type' => Controls::BOXSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure .oxi-image-hover-figure-caption:before' => '',
                    ],
                    'description' => 'Allows you at hover to attaches one or more shadows into Image shape.',
                ]
        );
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->add_responsive_control(
                'oxi-image-hover-padding',
                $this->style,
                [
                    'label' => esc_html__('Padding', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'separator' => TRUE,
                    'simpledimensions' => 'double',
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure .oxi-image-hover-caption-tab' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Padding used to generate space around an Image Hover content.',
                    'description' => 'Padding used to generate space around an Image Hover content.',
                ]
        );
        $this->end_controls_section();
    }

    public function register_description_settings() {
        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Description Settings', 'image-hover-effects-ultimate'),
                    'showing' => true,
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-desc-typho',
                $this->style,
                [
                    'type' => Controls::TYPOGRAPHY,
                    'include' => Controls::ALIGNNORMAL,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-content' => '',
                    ],
                ]
        );
        $this->add_control(
                'oxi-image-hover-desc-color',
                $this->style,
                [
                    'label' => esc_html__('Color', 'image-hover-effects-ultimate'),
                    'type' => Controls::COLOR,
                    'default' => '#ffffff',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-content' => 'color: {{VALUE}};',
                    ],
                    'simpledescription' => 'Color property is used to set the color of the Description.',
                    'description' => 'Color property is used to set the color of the Description.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-desc-tx-shadow',
                $this->style,
                [
                    'type' => Controls::TEXTSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-content' => '',
                    ],
                    'simpledescription' => 'Text Shadow property adds shadow to Description.',
                    'description' => 'Text Shadow property adds shadow to Description.',
                ]
        );

        $this->add_responsive_control(
                'oxi-image-hover-desc-margin',
                $this->style,
                [
                    'label' => esc_html__('Margin', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'simpledimensions' => 'heading',
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-content' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Margin properties are used to create space around Description.',
                    'description' => 'Margin properties are used to create space around Description.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-desc-animation',
                $this->style,
                [
                    'label' => esc_html__('Animation', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => 'solid',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'iheu-fade-up' => esc_html__('Fade Up', 'image-hover-effects-ultimate'),
                        'iheu-fade-down' => esc_html__('Fade Down', 'image-hover-effects-ultimate'),
                        'iheu-fade-left' => esc_html__('Fade Left', 'image-hover-effects-ultimate'),
                        'iheu-fade-right' => esc_html__('Fade Right', 'image-hover-effects-ultimate'),
                        'iheu-fade-up-big' => esc_html__('Fade up Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-down-big' => esc_html__('Fade down Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-left-big' => esc_html__('Fade left Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-right-big' => esc_html__('Fade Right Big', 'image-hover-effects-ultimate'),
                        'iheu-zoom-in' => esc_html__('Zoom In', 'image-hover-effects-ultimate'),
                        'iheu-zoom-out' => esc_html__('Zoom Out', 'image-hover-effects-ultimate'),
                        'iheu-flip-x' => esc_html__('Flip X', 'image-hover-effects-ultimate'),
                        'iheu-flip-y' => esc_html__('Flip Y', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-content' => '',
                    ],
                    'simpledescription' => 'Allows you to animated Description while viewing.',
                    'description' => 'Allows you to animated Description while viewing.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-desc-animation-delay',
                $this->style,
                [
                    'label' => esc_html__('Animation Delay', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => '',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xs' => esc_html__('Delay XS', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-sm' => esc_html__('Delay SM', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-md' => esc_html__('Delay MD', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-lg' => esc_html__('Delay LG', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xl' => esc_html__('Delay XL', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xxl' => esc_html__('Delay XXL', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-content' => '',
                    ],
                    'simpledescription' => 'Allows you to animation delay at Description while viewing.',
                    'description' => 'Allows you to animation delay at Description while viewing.',
                ]
        );

        $this->end_controls_section();
    }

    public function register_heading_settings() {
        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Heading Settings', 'image-hover-effects-ultimate'),
                    'showing' => TRUE,
                ]
        );
        $this->add_control(
                'oxi-image-hover-heading-underline',
                $this->style,
                [
                    'label' => esc_html__('Haading Underline', 'image-hover-effects-ultimate'),
                    'type' => Controls::CHOOSE,
                    'operator' => Controls::OPERATOR_TEXT,
                    'default' => '',
                    'options' => [
                        'oxi-image-hover-heading-underline' => [
                            'title' => esc_html__('Show', 'image-hover-effects-ultimate'),
                        ],
                        '' => [
                            'title' => esc_html__('Hide', 'image-hover-effects-ultimate'),
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading' => '',
                    ],
                    'simpledescription' => 'Wanna set Heading Underline? Works with heading color.',
                    'description' => 'Wanna set Heading Underline? Customization Panel will viewing while values "Show".',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-heading-typho',
                $this->style,
                [
                    'type' => Controls::TYPOGRAPHY,
                    'include' => Controls::ALIGNNORMAL,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading' => '',
                    ]
                ]
        );
        $this->add_control(
                'oxi-image-hover-heading-color',
                $this->style,
                [
                    'label' => esc_html__('Color', 'image-hover-effects-ultimate'),
                    'type' => Controls::COLOR,
                    'default' => '#ffffff',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading' => 'color: {{VALUE}};',
                    ],
                    'simpledescription' => 'Color property is used to set the color of the Heading.',
                    'description' => 'Color property is used to set the color of the Heading.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-heading-background',
                $this->style,
                [
                    'type' => Controls::BACKGROUND,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading' => '',
                    ],
                    'simpledescription' => 'Background property is used to set the Background of the Heading.',
                    'description' => 'Background property is used to set the Background of the Heading.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-heading-tx-shadow',
                $this->style,
                [
                    'type' => Controls::TEXTSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading' => '',
                    ],
                    'simpledescription' => 'Text Shadow property adds shadow to Heading.',
                    'description' => 'Text Shadow property adds shadow to Heading.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-heading-padding',
                $this->style,
                [
                    'label' => esc_html__('Padding', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'simpledimensions' => 'double',
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Padding properties are used to create space around Heading.',
                    'description' => 'Padding properties are used to create space around Heading.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-heading-margin',
                $this->style,
                [
                    'label' => esc_html__('Margin', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'simpledimensions' => 'double',
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-figure-heading' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Margin properties are used to create space around Heading.',
                    'description' => 'Margin properties are used to create space around Heading.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-heading-animation',
                $this->style,
                [
                    'label' => esc_html__('Animation', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => '',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'iheu-fade-up' => esc_html__('Fade Up', 'image-hover-effects-ultimate'),
                        'iheu-fade-down' => esc_html__('Fade Down', 'image-hover-effects-ultimate'),
                        'iheu-fade-left' => esc_html__('Fade Left', 'image-hover-effects-ultimate'),
                        'iheu-fade-right' => esc_html__('Fade Right', 'image-hover-effects-ultimate'),
                        'iheu-fade-up-big' => esc_html__('Fade up Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-down-big' => esc_html__('Fade down Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-left-big' => esc_html__('Fade left Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-right-big' => esc_html__('Fade Right Big', 'image-hover-effects-ultimate'),
                        'iheu-zoom-in' => esc_html__('Zoom In', 'image-hover-effects-ultimate'),
                        'iheu-zoom-out' => esc_html__('Zoom Out', 'image-hover-effects-ultimate'),
                        'iheu-flip-x' => esc_html__('Flip X', 'image-hover-effects-ultimate'),
                        'iheu-flip-y' => esc_html__('Flip Y', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-figure-heading' => '',
                    ],
                    'simpledescription' => 'Allows you to animated Heading while viewing.',
                    'description' => 'Allows you to animated Heading while viewing.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-heading-animation-delay',
                $this->style,
                [
                    'label' => esc_html__('Animation Delay', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => '',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xs' => esc_html__('Delay XS', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-sm' => esc_html__('Delay SM', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-md' => esc_html__('Delay MD', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-lg' => esc_html__('Delay LG', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xl' => esc_html__('Delay XL', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xxl' => esc_html__('Delay XXL', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-figure-heading' => '',
                    ],
                    'simpledescription' => 'Allows you to animation delay at Heading while viewing.',
                    'description' => 'Allows you to animation delay at Heading while viewing.',
                ]
        );

        $this->end_controls_section();
    }

    public function register_heading_underline() {
        $this->start_controls_section(
                'oxi-image-hover-head-underline',
                [
                    'label' => esc_html__('Heading Underline', 'image-hover-effects-ultimate'),
                    'showing' => false,
                    'simpleenable' => false,
                    'condition' => [
                        'oxi-image-hover-heading-underline' => 'oxi-image-hover-heading-underline'
                    ]
                ]
        );
        $this->add_control(
                'oxi-image-hover-underline-position',
                $this->style,
                [
                    'label' => esc_html__('Position', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => '',
                    'options' => [
                        '' => esc_html__('Default', 'image-hover-effects-ultimate'),
                        'left: 0; transform: translateX(0%);' => esc_html__('Left', 'image-hover-effects-ultimate'),
                        'left: 50%; transform: translateX(-50%);' => esc_html__('Center', 'image-hover-effects-ultimate'),
                        'left: 100%; transform: translateX(-100%);' => esc_html__('Right', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading.oxi-image-hover-heading-underline:before' => '{{VALUE}}',
                    ],
                    'simpledescription' => '',
                    'description' => 'Allows you set Heading Underline Position while Default comes with parent values.',
                ]
        );

        $this->add_control(
                'oxi-image-hover-underline-color',
                $this->style,
                [
                    'label' => esc_html__('Color', 'image-hover-effects-ultimate'),
                    'type' => Controls::COLOR,
                    'default' => '#ffffff',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading.oxi-image-hover-heading-underline:before' => 'border-bottom-color: {{VALUE}};',
                    ],
                    'simpledescription' => 'Allows you set Heading Underline Color.',
                    'description' => 'Allows you set Heading Underline Color.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-underline-type',
                $this->style,
                [
                    'label' => esc_html__('Underline Type', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => 'solid',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'solid' => esc_html__('Solid', 'image-hover-effects-ultimate'),
                        'dotted' => esc_html__('Dotted', 'image-hover-effects-ultimate'),
                        'dashed' => esc_html__('Dashed', 'image-hover-effects-ultimate'),
                        'double' => esc_html__('Double', 'image-hover-effects-ultimate'),
                        'groove' => esc_html__('Groove', 'image-hover-effects-ultimate'),
                        'ridge' => esc_html__('Ridge', 'image-hover-effects-ultimate'),
                        'inset' => esc_html__('Inset', 'image-hover-effects-ultimate'),
                        'outset' => esc_html__('Outset', 'image-hover-effects-ultimate'),
                        'hidden' => esc_html__('Hidden', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading.oxi-image-hover-heading-underline:before' => 'border-bottom-style: {{VALUE}};',
                    ],
                    'simpledescription' => '',
                    'description' => 'Allows you set Heading Underline Type, Default comes with solid value.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-underline-width',
                $this->style,
                [
                    'label' => esc_html__('Width', 'image-hover-effects-ultimate'),
                    'type' => Controls::SLIDER,
                    'default' => [
                        'unit' => '%',
                        'size' => 100,
                    ],
                    'range' => [
                        'px' => [
                            'min' => 1,
                            'max' => 1900,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 1,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 1,
                            'max' => 200,
                            'step' => 0.1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading.oxi-image-hover-heading-underline:before' => 'width:{{SIZE}}{{UNIT}};',
                    ],
                    'simpledescription' => '',
                    'description' => 'Allows you set Heading Underline Width, Default comes with 100%, You can set as like as you want.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-underline-height',
                $this->style,
                [
                    'label' => esc_html__('Size', 'image-hover-effects-ultimate'),
                    'type' => Controls::SLIDER,
                    'default' => [
                        'unit' => 'px',
                        'size' => 1,
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 50,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 1,
                            'max' => 100,
                            'step' => 1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-heading.oxi-image-hover-heading-underline:before' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
                    ],
                    'simpledescription' => '',
                    'description' => 'Allows you set Heading Underline Height, Default comes with 2px, You can set as like as you want.',
                ]
        );
        $this->end_controls_section();
    }

    public function register_button_settings() {
        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Button Settings', 'image-hover-effects-ultimate'),
                    'showing' => false,
                ]
        );
        $this->add_control(
                'oxi-image-hover-button-position',
                $this->style,
                [
                    'label' => esc_html__('Position', 'image-hover-effects-ultimate'),
                    'type' => Controls::CHOOSE,
                    'operator' => Controls::OPERATOR_ICON,
                    'default' => 'left',
                    'options' => [
                        'left' => [
                            'title' => esc_html__('Left', 'image-hover-effects-ultimate'),
                            'icon' => 'fa fa-align-left',
                        ],
                        'center' => [
                            'title' => esc_html__('Center', 'image-hover-effects-ultimate'),
                            'icon' => 'fa fa-align-center',
                        ],
                        'right' => [
                            'title' => esc_html__('Right', 'image-hover-effects-ultimate'),
                            'icon' => 'fa fa-align-right',
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-figure-caption .oxi-image-hover-button' => 'text-align:{{VALUE}}',
                    ],
                    'simpledescription' => 'Allows you set Button Align as Left, Center or Right.',
                    'description' => 'Allows you set Button Align as Left, Center or Right.',
                ]
        );

        $this->add_group_control(
                'oxi-image-hover-button-typho',
                $this->style,
                [
                    'type' => Controls::TYPOGRAPHY,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => '',
                    ]
                ]
        );
        $this->start_controls_tabs(
                'oxi-image-hover-start-tabs',
                [
                    'options' => [
                        'normal' => esc_html__('Normal ', 'image-hover-effects-ultimate'),
                        'hover' => esc_html__('Hover ', 'image-hover-effects-ultimate'),
                    ]
                ]
        );
        $this->start_controls_tab();
        $this->add_control(
                'oxi-image-hover-button-color',
                $this->style,
                [
                    'label' => esc_html__('Color', 'image-hover-effects-ultimate'),
                    'type' => Controls::COLOR,
                    'default' => '#ffffff',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => 'color: {{VALUE}};',
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn:hover' => 'color: {{VALUE}};',
                    ],
                    'simpledescription' => 'Color property is used to set the color of the Button.',
                    'description' => 'Color property is used to set the color of the Button.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-button-background',
                $this->style,
                [
                    'label' => esc_html__('Background', 'image-hover-effects-ultimate'),
                    'type' => Controls::GRADIENT,
                    'default' => 'rgba(171, 0, 201, 1)',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => 'background: {{VALUE}};',
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn:hover' => 'background: {{VALUE}};',
                    ],
                    'simpledescription' => 'Background property is used to set the Background of the Button.',
                    'description' => 'Background property is used to set the Background of the Button.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-button-border',
                $this->style,
                [
                    'type' => Controls::BORDER,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => ''
                    ],
                    'simpledescription' => 'Button',
                    'description' => 'Border property is used to set the Border of the Button.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-button-tx-shadow',
                $this->style,
                [
                    'type' => Controls::TEXTSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => '',
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn:hover' => '',
                    ],
                    'simpledescription' => 'Text Shadow property adds shadow to Button.',
                    'description' => 'Text Shadow property adds shadow to Button.',
                ]
        );

        $this->add_responsive_control(
                'oxi-image-hover-button-radius',
                $this->style,
                [
                    'label' => esc_html__('Border Radius', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 50,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn:hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Allows you to add rounded corners to Button with options.',
                    'description' => 'Allows you to add rounded corners to Button with options.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-button-boxshadow',
                $this->style,
                [
                    'type' => Controls::BOXSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => '',
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn:hover' => '',
                    ],
                    'description' => 'Allows you to attaches one or more shadows into Button.',
                ]
        );
        $this->end_controls_tab();
        $this->start_controls_tab();
        $this->add_control(
                'oxi-image-hover-button-hover-color',
                $this->style,
                [
                    'label' => esc_html__('Color', 'image-hover-effects-ultimate'),
                    'type' => Controls::COLOR,
                    'default' => '#ffffff',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab .oxi-image-hover-button a.oxi-image-btn:hover' => 'color: {{VALUE}};',
                    ],
                    'simpledescription' => 'Color property is used to set the Hover color of the Button.',
                    'description' => 'Color property is used to set the Hover color of the Button.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-button-hover-background',
                $this->style,
                [
                    'label' => esc_html__('Background', 'image-hover-effects-ultimate'),
                    'type' => Controls::GRADIENT,
                    'default' => '#ffffff',
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab .oxi-image-hover-button a.oxi-image-btn:hover' => 'background: {{VALUE}};',
                    ],
                    'simpledescription' => 'Background property is used to set the Hover Background of the Button.',
                    'description' => 'Background property is used to set the Hover Background of the Button.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-button-hover-border',
                $this->style,
                [
                    'type' => Controls::BORDER,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab .oxi-image-hover-button a.oxi-image-btn:hover' => ''
                    ],
                    'simpledescription' => 'Button',
                    'description' => 'Border property is used to set the Hover Border of the Button.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-button-hover-tx-shadow',
                $this->style,
                [
                    'type' => Controls::TEXTSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab .oxi-image-hover-button a.oxi-image-btn:hover' => '',
                    ],
                    'simpledescription' => 'Text Shadow property adds shadow to Hover Button.',
                    'description' => 'Text Shadow property adds shadow to Hover Button.',
                ]
        );

        $this->add_responsive_control(
                'oxi-image-hover-button-hover-radius',
                $this->style,
                [
                    'label' => esc_html__('Border Radius', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 50,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab .oxi-image-hover-button a.oxi-image-btn:hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Allows you to add rounded corners at hover to Button with options.',
                    'description' => 'Allows you to add rounded corners at hover to Button with options.',
                ]
        );
        $this->add_group_control(
                'oxi-image-hover-hover-button-boxshadow',
                $this->style,
                [
                    'type' => Controls::BOXSHADOW,
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-caption-tab .oxi-image-hover-button a.oxi-image-btn:hover' => '',
                    ],
                    'description' => 'Allows you at hover to attaches one or more shadows into Button.',
                ]
        );

        $this->end_controls_tab();
        $this->end_controls_tabs();

        $this->add_responsive_control(
                'oxi-image-hover-button-padding',
                $this->style,
                [
                    'label' => esc_html__('Padding', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'simpledimensions' => 'double',
                    'separator' => TRUE,
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Generate space around a Button, inside of any defined borders or Background.',
                    'description' => 'Generate space around a Button, inside of any defined borders or Background.',
                ]
        );
        $this->add_responsive_control(
                'oxi-image-hover-button-margin',
                $this->style,
                [
                    'label' => esc_html__('Margin', 'image-hover-effects-ultimate'),
                    'type' => Controls::DIMENSIONS,
                    'simpledimensions' => 'double',
                    'default' => [
                        'unit' => 'px',
                        'size' => '',
                    ],
                    'range' => [
                        'px' => [
                            'min' => 0,
                            'max' => 500,
                            'step' => 1,
                        ],
                        '%' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => 1,
                        ],
                        'em' => [
                            'min' => 0,
                            'max' => 100,
                            'step' => .1,
                        ],
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button a.oxi-image-btn' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                    ],
                    'simpledescription' => 'Generate space around a Button, Outside of Content.',
                    'description' => 'Generate space around a Button, Outside of Content.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-button-animation',
                $this->style,
                [
                    'label' => esc_html__('Animation', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => 'solid',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'iheu-fade-up' => esc_html__('Fade Up', 'image-hover-effects-ultimate'),
                        'iheu-fade-down' => esc_html__('Fade Down', 'image-hover-effects-ultimate'),
                        'iheu-fade-left' => esc_html__('Fade Left', 'image-hover-effects-ultimate'),
                        'iheu-fade-right' => esc_html__('Fade Right', 'image-hover-effects-ultimate'),
                        'iheu-fade-up-big' => esc_html__('Fade up Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-down-big' => esc_html__('Fade down Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-left-big' => esc_html__('Fade left Big', 'image-hover-effects-ultimate'),
                        'iheu-fade-right-big' => esc_html__('Fade Right Big', 'image-hover-effects-ultimate'),
                        'iheu-zoom-in' => esc_html__('Zoom In', 'image-hover-effects-ultimate'),
                        'iheu-zoom-out' => esc_html__('Zoom Out', 'image-hover-effects-ultimate'),
                        'iheu-flip-x' => esc_html__('Flip X', 'image-hover-effects-ultimate'),
                        'iheu-flip-y' => esc_html__('Flip Y', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button' => '',
                    ],
                    'simpledescription' => 'Allows you to animated Button while viewing.',
                    'description' => 'Allows you to animated Button while viewing.',
                ]
        );
        $this->add_control(
                'oxi-image-hover-button-animation-delay',
                $this->style,
                [
                    'label' => esc_html__('Animation Delay', 'image-hover-effects-ultimate'),
                    'type' => Controls::SELECT,
                    'default' => '',
                    'options' => [
                        '' => esc_html__('None', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xs' => esc_html__('Delay XS', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-sm' => esc_html__('Delay SM', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-md' => esc_html__('Delay MD', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-lg' => esc_html__('Delay LG', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xl' => esc_html__('Delay XL', 'image-hover-effects-ultimate'),
                        'oxi-image-hover-delay-xxl' => esc_html__('Delay XXL', 'image-hover-effects-ultimate'),
                    ],
                    'selector' => [
                        '{{WRAPPER}} .oxi-image-hover-button' => '',
                    ],
                    'simpledescription' => 'Allows you to animation delay at Button while viewing.',
                    'description' => 'Allows you to animation delay at Button while viewing.',
                ]
        );

        $this->end_controls_section();
    }

    public function register_controls() {

        if (apply_filters('oxi-image-hover-plugin-version', false) == FALSE):
            $this->start_section_header(
                    'shortcode-addons-start-tabs',
                    [
                        'options' => [
                            'square-settings' => esc_html__('General Settings', 'image-hover-effects-ultimate'),
                            'typography' => esc_html__('Typography', 'image-hover-effects-ultimate'),
                            'custom' => esc_html__('Custom CSS', 'image-hover-effects-ultimate'),
                        ]
                    ]
            );
        else:
            $this->start_section_header(
                    'shortcode-addons-start-tabs',
                    [
                        'options' => [
                            'square-settings' => esc_html__('General Settings', 'image-hover-effects-ultimate'),
                            'typography' => esc_html__('Typography', 'image-hover-effects-ultimate'),
                            'dynamic' => esc_html__('Dynamic Content', 'image-hover-effects-ultimate'),
                            'custom' => esc_html__('Custom CSS', 'image-hover-effects-ultimate'),
                        ]
                    ]
            );
        endif;

        $this->start_section_tabs(
                'oxi-image-hover-start-tabs',
                [
                    'condition' => [
                        'oxi-image-hover-start-tabs' => 'square-settings'
                    ]
                ]
        );
        $this->start_section_devider();
        $this->register_column_effects();
        $this->register_general_style();
        $this->end_section_devider();
        $this->start_section_devider();
        $this->register_content_settings();
        $this->end_section_devider();
        $this->end_section_tabs();
        $this->start_section_tabs(
                'oxi-image-hover-start-tabs',
                [
                    'condition' => [
                        'oxi-image-hover-start-tabs' => 'typography'
                    ]
                ]
        );
        $this->start_section_devider();

        $this->register_heading_settings();
        $this->register_heading_underline();

        $this->end_section_devider();
        $this->start_section_devider();

        $this->register_description_settings();
        $this->register_button_settings();
        $this->end_section_devider();
        $this->end_section_tabs();
        $this->register_dynamic_data();

        $this->start_section_tabs(
                'oxi-image-hover-start-tabs',
                [
                    'condition' => [
                        'oxi-image-hover-start-tabs' => 'custom'
                    ],
                    'padding' => '10px'
                ]
        );

        $this->start_controls_section(
                'oxi-image-hover',
                [
                    'label' => esc_html__('Custom CSS', 'image-hover-effects-ultimate'),
                    'showing' => TRUE,
                ]
        );
        $this->add_control(
                'image-hover-custom-css',
                $this->style,
                [
                    'label' => esc_html__('', 'image-hover-effects-ultimate'),
                    'type' => Controls::TEXTAREA,
                    'default' => '',
                    'description' => 'Custom CSS Section. You can add custom css into textarea.'
                ]
        );
        $this->end_controls_section();
        $this->end_section_tabs();
    }

    public function modal_opener() {
        $this->add_substitute_control('', [], [
            'type' => Controls::MODALOPENER,
            'title' => esc_html__('Add New Image Hover', 'image-hover-effects-ultimate'),
            'sub-title' => esc_html__('Open Image Hover Form', 'image-hover-effects-ultimate'),
            'showing' => TRUE,
        ]);
    }

    public function modal_form_data() {
        ?>
        <div class="modal-header">
            <h4 class="modal-title">Image Hover Form</h4>
            <button type="button" class="close" data-dismiss="modal">&times;</button>
        </div>
        <div class="modal-body">
            <?php
            $this->add_control(
                    'image_hover_heading',
                    $this->style,
                    [
                        'label' => esc_html__('Title', 'image-hover-effects-ultimate'),
                        'type' => Controls::TEXT,
                        'default' => '',
                        'placeholder' => 'Heading',
                        'description' => 'Add Your Image Hover Title.'
                    ]
            );
            $this->add_control(
                    'image_hover_description',
                    $this->style,
                    [
                        'label' => esc_html__('Short Description', 'image-hover-effects-ultimate'),
                        'type' => Controls::TEXTAREA,
                        'default' => '',
                        'description' => 'Add Your Description Unless make it blank.'
                    ]
            );

            $this->start_controls_tabs(
                    'image_hover-start-tabs',
                    [
                        'options' => [
                            'frontend' => esc_html__('Image', 'image-hover-effects-ultimate'),
                            'backend' => esc_html__('Feature Image', 'image-hover-effects-ultimate'),
                        ]
                    ]
            );
            $this->start_controls_tab();

            $this->add_group_control(
                    'image_hover_image',
                    $this->style,
                    [
                        'label' => esc_html__('Image', 'image-hover-effects-ultimate'),
                        'type' => Controls::MEDIA,
                        'description' => 'Add or Modify Your Image. You can use Media Library or Custom URL'
                    ]
            );

            $this->end_controls_tab();

            $this->start_controls_tab();
            $this->add_group_control(
                    'image_hover_feature_image',
                    $this->style,
                    [
                        'label' => esc_html__('Feature Image', 'image-hover-effects-ultimate'),
                        'type' => Controls::MEDIA,
                        'description' => 'Add or Modify Your Feature Image. Adjust background to get better design.'
                    ]
            );
            $this->end_controls_tab();
            $this->end_controls_tabs();
            $this->add_group_control(
                    'image_hover_button_link',
                    $this->style,
                    [
                        'label' => esc_html__('URL', 'image-hover-effects-ultimate'),
                        'type' => Controls::URL,
                        'separator' => TRUE,
                        'default' => '',
                        'placeholder' => 'https://www.yoururl.com',
                        'description' => 'Add Your Desire Link or Url Unless make it blank'
                    ]
            );
            $this->add_control(
                    'image_hover_button_text',
                    $this->style,
                    [
                        'label' => esc_html__('Button Text', 'image-hover-effects-ultimate'),
                        'type' => Controls::TEXT,
                        'default' => '',
                        'description' => 'Customize your button text. Button will only view while Url given'
                    ]
            );
            ?>
        </div>
        <?php
    }

    /**
     * Template Parent Item Data Rearrange
     *
     * @since 2.0.0
     */
    public function Rearrange() {
        return '<li class="list-group-item" id="{{id}}">{{image_hover_heading}}</li>';
    }

}
