<?php

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

$layout_feature_two = new \Elementor\Repeater();

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

$layout_feature_two->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_two, 'Title', 'h3', 'layout_two');


$layout_feature_two->add_control(
    'content',
    [
        'label' => __('Content', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'placeholder' => __('Add Content', 'ostech-addon'),
        'default' => __('Default Content', 'ostech-addon'),
        'label_block' => true
    ]
);

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


$this->end_controls_section();
