<?php

namespace Layerdrops\Ostech\Widgets;


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

    public function get_title()
    {
        return __('Massage', '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')
                ]
            ]
        );

        $this->end_controls_section();

        include ostech_get_elementor_option('massage-one-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-two__title', ['layout_one']);
        ostech_elementor_general_style_options($this, 'Section Sub Title', '{{WRAPPER}} .sec-title-two__tagline', ['layout_one']);

        ostech_elementor_general_style_options($this, 'Tab Title', '{{WRAPPER}} .massage__tabs li', ['layout_one']);
        ostech_elementor_general_style_options($this, 'Title', '{{WRAPPER}} .massage__content__title', ['layout_one']);
        ostech_elementor_general_style_options($this, 'Summary', '{{WRAPPER}} .massage__content__text', ['layout_one']);

        $this->end_controls_section();

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

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

        $this->end_controls_section();
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include ostech_get_template('massage-one.php');
    }
}
