<?php
/**
 * Kit Contents Widget - Content Controls
 *
 * @package GGM_Commerce
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// $this is the GGM_Commerce_Widget_Kit_Contents instance.

$this->start_controls_section(
	'section_content',
	array(
		'label' => 'Content',
		'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
	)
);

$this->add_control(
	'title',
	array(
		'label'   => 'Section Title',
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => "What's Included",
	)
);

$this->add_control(
	'show_title',
	array(
		'label'        => 'Show Title',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => 'Show',
		'label_off'    => 'Hide',
		'return_value' => 'yes',
	)
);

$this->add_control(
	'show_images',
	array(
		'label'        => 'Show Component Images',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => 'Show',
		'label_off'    => 'Hide',
		'return_value' => 'yes',
	)
);

$this->add_control(
	'show_quantities',
	array(
		'label'        => 'Show Quantities',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => 'Show',
		'label_off'    => 'Hide',
		'return_value' => 'yes',
	)
);

$this->add_control(
	'show_prices',
	array(
		'label'        => 'Show Component Prices',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => '',
		'label_on'     => 'Show',
		'label_off'    => 'Hide',
		'return_value' => 'yes',
	)
);

$this->add_control(
	'link_to_products',
	array(
		'label'        => 'Link to Component Products',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => '',
		'label_on'     => 'Yes',
		'label_off'    => 'No',
		'return_value' => 'yes',
	)
);

$this->add_control(
	'layout',
	array(
		'label'   => 'Layout',
		'type'    => \Elementor\Controls_Manager::SELECT,
		'default' => 'list',
		'options' => array(
			'list'  => 'List',
			'grid'  => 'Grid',
			'table' => 'Table',
		),
	)
);

$this->add_control(
	'hide_if_not_kit',
	array(
		'label'        => 'Hide for Non-Kit Products',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => 'Yes',
		'label_off'    => 'No',
		'return_value' => 'yes',
		'description'  => 'Hide this widget on product pages that are not kits or builds.',
	)
);

$this->end_controls_section();
