<?php
/**
 * Customer Downloads Widget - Content Controls
 *
 * @package GGM_Commerce
 */

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

// $this is the GGM_Commerce_Widget_Customer_Downloads instance.

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

$this->add_control(
	'title',
	array(
		'label'   => 'Title',
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => 'My Downloads',
	)
);

$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(
	'empty_message',
	array(
		'label'   => 'Empty Message',
		'type'    => \Elementor\Controls_Manager::TEXTAREA,
		'default' => 'You don\'t have any downloads yet.',
	)
);

$this->add_control(
	'login_message',
	array(
		'label'   => 'Login Required Message',
		'type'    => \Elementor\Controls_Manager::TEXTAREA,
		'default' => 'Please log in to view your downloads.',
	)
);

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

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

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

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

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

$this->end_controls_section();
