<?php
/**
 * Discount Code Input Widget - Content Controls
 *
 * @package GGM_Commerce
 */

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

// $this is the GGM_Commerce_Widget_Discount_Code_Input instance.

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

$this->add_control(
	'input_placeholder',
	array(
		'label'   => 'Input Placeholder',
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => 'Enter discount code',
	)
);

$this->add_control(
	'button_text',
	array(
		'label'   => 'Button Text',
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => 'Apply',
	)
);

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

$this->add_control(
	'label_text',
	array(
		'label'     => 'Label Text',
		'type'      => \Elementor\Controls_Manager::TEXT,
		'default'   => 'Have a discount code?',
		'condition' => array(
			'show_label' => 'yes',
		),
	)
);

$this->add_control(
	'collapsible',
	array(
		'label'        => 'Collapsible',
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'description'  => 'Click on label to show/hide input',
		'label_on'     => 'Yes',
		'label_off'    => 'No',
		'return_value' => 'yes',
	)
);

$this->end_controls_section();
