<?php
namespace Sifency\Traits;

use Elementor\Controls_Manager;
use Elementor\Group_Control_Typography;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

trait Sifency_Label_Content_Controls_Trait {
	protected function add_sifency_label_content_controls() {
		// --- Content Tab: Label Settings ---
		$this->start_controls_section(
			'section_label_content',
			[
				'label' => esc_html__( 'Label', 'sifency-addons' ),
			]
		);

		$this->add_control(
			'show_label',
			[
				'label'        => esc_html__( 'Show Label', 'sifency-addons' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => esc_html__( 'Show', 'sifency-addons' ),
				'label_off'    => esc_html__( 'Hide', 'sifency-addons' ),
				'return_value' => 'yes',
				'default'      => 'yes',
			]
		);

		$this->add_control(
			'label_text',
			[
				'label'       => esc_html__( 'Label Text', 'sifency-addons' ),
				'type'        => Controls_Manager::TEXT,
				'default'     => esc_html__( 'Insert Label', 'sifency-addons' ),
				'placeholder' => esc_html__( 'Enter your label', 'sifency-addons' ),
				'condition'   => [
					'show_label' => 'yes',
				],
			]
		);

		$this->end_controls_section();
	}
}