<?php
// If this file is called directly, abort.
if (! defined('ABSPATH')) {
	exit;
}

// === CONTENT TAB ===
$this->start_controls_section(
	'content_section',
	[
		'label' => __('Content', 'ggm-commerce'),
		'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
	]
);

$this->add_control(
	'product_source',
	[
		'label' => __('Product Source', 'ggm-commerce'),
		'type' => \Elementor\Controls_Manager::SELECT,
		'default' => 'current',
		'options' => [
			'current' => __('Current Product (Auto-detect)', 'ggm-commerce'),
			'custom' => __('Select Product', 'ggm-commerce'),
		],
	]
);

$this->add_control(
	'product_id',
	[
		'label' => __('Product', 'ggm-commerce'),
		'type' => \Elementor\Controls_Manager::NUMBER,
		'default' => '',
		'condition' => [
			'product_source' => 'custom',
		],
		'description' => __('Start typing product name to search', 'ggm-commerce'),
	]
);

$this->end_controls_section();
