<?php

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

$this->add_control(
    'layout_two_title',
    [
        'label' => __('Add Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => __('Default Title', 'ostech-addon')
    ]
);

$this->add_control(
    'layout_two_sub_title',
    [
        'label' => __('Add Sub Title', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'default' => __('Default Sub Title', 'ostech-addon')
    ]
);

$footer_contact_list_two = new \Elementor\Repeater();

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

$footer_contact_list_two->add_control(
    'content',
    [
        'label' => __('Content', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'rows' => '2',
        'placeholder' => __('Add Content', 'ostech-addon'),
        'default' => __('<a href="tel:+923680006800">+92 (3680) 00 - 6800</a>', 'ostech-addon'),
    ]
);

$this->add_control(
    'footer_contact_list_two',
    [
        'label' => __('Contact Info', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $footer_contact_list_two->get_controls(),
        'prevent_empty' => false,
        'title_field' => '{{{ content }}}',
    ]
);

$this->end_controls_section();
