<?php

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

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

ostech_elementor_heading_option($this, 'Heading Title', 'h3', 'layout_four');

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

$this->add_control(
    'layout_two_feature_title',
    [
        'label' => __('Feature Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Feature Title', 'ostech-addon'),
        'default' => __('Feature Title', 'ostech-addon'),
        'label_block' => true
    ]
);

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

$layout_feature_four = new \Elementor\Repeater();

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

$layout_feature_four->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
    ]
);

ostech_elementor_heading_option($layout_feature_four, 'Title', 'h3', 'layout_four');


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

$this->end_controls_section();
