<?php

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

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

ostech_elementor_heading_option($this, 'Title', 'h3', 'layout_one');

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


$footer_contact_list = new \Elementor\Repeater();

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

$footer_contact_list->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',
    [
        'label' => __('Contact Info', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::REPEATER,
        'fields' => $footer_contact_list->get_controls(),
        'prevent_empty' => false,
        'title_field' => '{{{ content }}}',
    ]
);

$this->end_controls_section();
