<?php

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


$award_list = new \Elementor\Repeater();

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

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

$award_list->add_control(
    'year',
    [
        'label' => __('Year', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXT,
        'placeholder' => __('Add year text', 'ostech-addon'),
        'default' => __('2012', 'ostech-addon'),
        'label_block' => true
    ]
);

$award_list->add_control(
    'content',
    [
        'label' => __('Summary', 'ostech-addon'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'rows' => '2',
        'placeholder' => __('Add Summary', 'ostech-addon'),
        'default' => __('Default Summary', 'ostech-addon'),
    ]
);

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

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

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

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

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


$this->end_controls_section();
