<?php

namespace Layerdrops\Ostech\Widgets;


class Choose extends \Elementor\Widget_Base
{
    public function get_name()
    {
        return 'ostech-choose';
    }

    public function get_title()
    {
        return __('Choose', 'ostech-addon');
    }

    public function get_icon()
    {
        return 'eicon-cogs';
    }

    public function get_categories()
    {
        return ['ostech-category'];
    }

    protected function register_controls()
    {
        $this->start_controls_section(
            'layout_section',
            [
                'label' => __('Layout', 'ostech-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'layout_type',
            [
                'label' => __('Select Layout', 'ostech-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'default' => 'layout_one',
                'options' => [
                    'layout_one' => __('Layout One', 'ostech-addon'),
                    'layout_two' => __('Layout Two', 'ostech-addon'),
                    'layout_three' => __('Layout Three', 'ostech-addon'),
                    // 'layout_four' => __('Layout Four', 'ostech-addon'),
                ]
            ]
        );

        $this->end_controls_section();

        include ostech_get_elementor_option('choose-one-option.php');
        include ostech_get_elementor_option('choose-two-option.php');
        include ostech_get_elementor_option('choose-three-option.php');

        //General style
        $this->start_controls_section(
            'general_style',
            [
                'label' => esc_html__('Content Style', 'ostech-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        ostech_elementor_general_style_options($this, 'Section Title', '{{WRAPPER}} .sec-title__title,{{WRAPPER}} .sec-title-two__title', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);

        ostech_elementor_general_style_options($this, 'Section Sub Title', '{{WRAPPER}} .sec-title__tagline,{{WRAPPER}} .sec-title-two__tagline', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);

        ostech_elementor_general_style_options($this, 'Section Highlight Title', '{{WRAPPER}} .why-choose-two__cta__title ,{{WRAPPER}} .why-choose-four__content__title', ['layout_one', 'layout_four']);

        ostech_elementor_general_style_options($this, 'Section Summary', '{{WRAPPER}} .about-two__top__text,{{WRAPPER}} .why-choose-three__content__text,{{WRAPPER}} .why-choose-four__content__text,{{WRAPPER}} .why-choose-three__top__text', ['layout_one', 'layout_three', 'layout_four']);

        ostech_elementor_general_style_options($this, 'Title', '{{WRAPPER}} .why-choose-two__inner__item__text,{{WRAPPER}} .why-choose-one__feature__item__text,{{WRAPPER}} .why-choose-three__feature__top__title', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);

        ostech_elementor_general_style_options($this, 'Info', '{{WRAPPER}} .why-choose-three__feature__item__text', ['layout_one', 'layout_two', 'layout_three', 'layout_four']);

        ostech_elementor_button_style_options($this, 'Button', '{{WRAPPER}} .why-choose-two__cta__link__btn,{{WRAPPER}} .ostech-btn', '{{WRAPPER}} .why-choose-two__cta__link__btn:before,{{WRAPPER}} .why-choose-two__cta__link__btn:after,{{WRAPPER}} .ostech-btn:before,{{WRAPPER}} .ostech-btn:after', ['layout_one', 'layout_two']);

        ostech_elementor_button_style_options($this, 'Button Icon', '{{WRAPPER}} .why-choose-two__inner__item__link__btn,{{WRAPPER}} .why-choose-one__feature__item__link__btn', '{{WRAPPER}} .why-choose-two__inner__item__link__btn:hover,{{WRAPPER}} .why-choose-one__feature__item__link__btn:hover ', ['layout_one', 'layout_two']);

        $this->end_controls_section();
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include ostech_get_template('choose-one.php');
        include ostech_get_template('choose-two.php');
        include ostech_get_template('choose-three.php');
        // include ostech_get_template('choose-four.php');
    }
}
