<?php

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

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


$this->add_control(
    'layout_two_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_two');

$this->add_control(
    'layout_two_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_two');


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

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

$layout_two_service_list = new \Elementor\Repeater();

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

$layout_two_service_list->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($layout_two_service_list, 'Service Title', 'h6', 'layout_one');

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

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

$layout_two_content_list = new \Elementor\Repeater();

$layout_two_content_list->add_control(
    'title',
    [
        'label' => __('Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'placeholder' => __('Add title', 'ostech-addon'),
        'default' => __('Default Title', 'ostech-addon'),
        'label_block' => true
    ]
);


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

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

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

$this->add_control(
    'layout_two_button_label',
    [
        'label' => __('Button Label', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => __('Discover More', 'ostech-addon'),
        'label_block' => true,
    ]
);

$this->add_control(
    'layout_two_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_two_icon',
    [
        'label' => __('Icon', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::ICONS,
        'default' => [
            'value' => 'icon-award',
            'library' => 'custom-icon',
        ],
    ]
);

$this->add_control(
    'layout_two_feature_title',
    [
        'label' => __('Contact Info', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'rows' => '1',
        'placeholder' => __('Add Contact Info', 'ostech-addon'),
        'default' => __('Award Winning Agency', 'ostech-addon'),
        'label_block' => true
    ]
);


$this->add_control(
    'layout_two_chat_icon',
    [
        'label' => __('Icon', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::ICONS,
        'default' => [
            'value' => 'icon-chatting-1',
            'library' => 'custom-icon',
        ],
    ]
);
$this->add_control(
    'layout_two_call_text',
    [
        'label' => __('Contact Text', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'rows' => '1',
        'placeholder' => __('Add Contact Info', 'ostech-addon'),
        'default' => __('Call to anytime', 'ostech-addon'),
        'label_block' => true
    ]
);
$this->add_control(
    'layout_two_call_number',
    [
        'label' => __('Contact Info', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'rows' => '1',
        'placeholder' => __('Add Contact Info', 'ostech-addon'),
        'default' => __('<a href="tel:+92-3080-808">+92 3080 808</a>', 'ostech-addon'),
        'label_block' => true
    ]
);

$this->end_controls_section();

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

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

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

$this->end_controls_section();
