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

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

// $this is the GGM_Commerce_Widget_Applied_Discount instance.

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

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

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

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

$this->add_control(
	'empty_message',
	array(
		'label'       => 'Empty State Text',
		'type'        => \Elementor\Controls_Manager::TEXT,
		'default'     => '',
		'description' => 'Text to show when no discount is applied (leave empty to hide widget)',
	)
);

$this->add_control(
	'discount_label',
	array(
		'label'   => 'Discount Label',
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => 'Discount:',
	)
);

$this->end_controls_section();
