<?php

$this->start_controls_section(
    'content_section_six',
    [
        'label' => __('Content', 'ostech-addon'),
        'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
        'condition' => [
            'layout_type' => 'layout_six'
        ]
    ]
);

$this->add_control(
    'layout_six_sec_icon',
    [
        'label' => __('Section Icon', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::ICONS,
        'default' => [
            'value' => 'ostech-icons-two-logo',
            'library' => 'custom-icon',
        ],
    ]
);

$this->add_control(
    'layout_six_sec_title',
    [
        'label' => __('Section Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add title', 'ostech-addon'),
        'default' => __('Default Title', 'ostech-addon'),
    ]
);

ostech_elementor_heading_option($this, 'Section Title', 'h3', 'layout_six');

$this->add_control(
    'layout_six_sec_sub_title',
    [
        'label' => __('Section Sub Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add sub title', 'ostech-addon'),
        'default' => __('Default Sub Title', 'ostech-addon'),
    ]
);

ostech_elementor_heading_option($this, 'Section Sub Title', 'h6', 'layout_six');

$this->add_control(
    'layout_six_sec_summary',
    [
        'label' => __('Section Summary', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add Summary', 'ostech-addon'),
        'default' => __('Default Summary', 'ostech-addon'),
    ]
);

$layout_six_customer_list = new \Elementor\Repeater();

$layout_six_customer_list->add_control(
    'image',
    [
        'label' => __('Image', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [
            'url' => \Elementor\Utils::get_placeholder_image_src(),
        ],
    ]
);

$this->add_control(
    'layout_six_customer_list',
    [
        'label' => __('Customer List', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $layout_six_customer_list->get_controls(),
    ]
);

$this->add_control(
    'layout_six_count_text',
    [
        'label' => __('Counter Text', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add Counter Text', 'ostech-addon'),
        'default' => __('Default Counter Text', 'ostech-addon'),
    ]
);

$this->add_control(
    'layout_six_count_number',
    [
        'label' => __('Counter Number', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add Counter Number', 'ostech-addon'),
        'default' => __('Default Counter Number', 'ostech-addon'),
    ]
);

$this->add_control(
    'layout_six_count_operator',
    [
        'label' => __('Counter Number', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add Counter Number', 'ostech-addon'),
        'default' => __('Default Counter Number', 'ostech-addon'),
    ]
);

$this->add_control(
    'layout_six_button_url',
    [
        'label' => __('Button Url', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::URL,
        'placeholder' => __('#', 'ostech-addon'),
        'show_external' => false,
        'default' => [
            'url' => '#',
            'is_external' => false,
            'nofollow' => false,
        ],
        'show_label' => true,
    ]
);

$this->add_control(
    'layout_six_button_label',
    [
        'label' => __('Button Label', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'rows' => '2',
        'placeholder' => __('Add button label', 'ostech-addon'),
        'default' => __('Button Label', 'ostech-addon'),
    ]
);

$this->add_control(
    'layout_six_button_icon',
    [
        'label' => __('Icon', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::ICONS,
        'default' => [
            'value' => 'ostech-icons-two-up-right-arrow',
            'library' => 'custom-icon',
        ],
    ]
);

$this->add_control(
    'layout_six_section_divider',
    [
        'type' => \Elementor\Controls_Manager::DIVIDER,
    ]
);

$service_list_six = new \Elementor\Repeater();

$service_list_six->add_control(
    'title',
    [
        'label' => __('Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'rows' => '2',
        'placeholder' => __('Add title', 'ostech-addon'),
        'default' => __('Default Title', 'ostech-addon'),
    ]
);

ostech_elementor_heading_option($service_list_six, 'Service Title', 'h3', 'layout_six');

$service_list_six->add_control(
    'icon',
    [
        'label' => __('Icon', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::ICONS,
        'default' => [
            'value' => 'icon-herbal',
            'library' => 'custom-icon',
        ],
    ]
);

$service_list_six->add_control(
    'image',
    [
        'label' => __('Image', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [
            'url' => \Elementor\Utils::get_placeholder_image_src(),
        ]
    ]
);

$service_list_six->add_control(
    'url',
    [
        'label' => __('Url', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::URL,
        'placeholder' => __('#', 'ostech-addon'),
        'show_external' => false,
        'default' => [
            'url' => '#',
            'is_external' => false,
            'nofollow' => false,
        ],
        'show_label' => true,
    ]
);

$this->add_control(
    'service_list_six',
    [
        'label' => __('Service Lists', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $service_list_six->get_controls(),
        'prevent_empty' => false,
        'title_field' => '{{{ title }}}',
    ]
);

$this->add_control(
    'layout_six_bg_image',
    [
        'label' => __('Background Image One', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_bg_image_two',
    [
        'label' => __('Background Image Two', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_shape_one',
    [
        'label' => __('Shape One', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_shape_two',
    [
        'label' => __('Shape Two', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_shape_three',
    [
        'label' => __('Shape Three', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_shape_four',
    [
        'label' => __('Shape Four', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_shape_five',
    [
        'label' => __('Shape Five', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->add_control(
    'layout_six_shape_six',
    [
        'label' => __('Shape Six', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::MEDIA,
        'default' => [],
    ]
);

$this->end_controls_section();
