<?php

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

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


$layout_feature_three = new \Elementor\Repeater();

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

$layout_feature_three->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_three, 'Title', 'h3', 'layout_three');

$layout_feature_three->add_control(
    'info',
    [
        'label' => __('SubTitle', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'placeholder' => __('Add title', 'ostech-addon'),
        'default' => __('Default Title', 'ostech-addon'),
        'label_block' => true
    ]
);
$this->add_control(
    'layout_three_features_list',
    [
        'label' => __('Features List', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $layout_feature_three->get_controls(),
        'prevent_empty' => false,
        'title_field' => '{{{ title }}}',
    ]
);

$this->end_controls_section();
