<?php
namespace Sifency\Traits;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
use Sifency\Traits\Sifency_Addons_Master_Typography;
use Sifency\Traits\Sifency_Addons_Flex_Controls;
use Sifency\Traits\Sifency_Addons_Help_Controls;
use Elementor\Controls_Manager;

trait Sifency_Addons_Trio_Text_Style_Controls {
	use Sifency_Addons_Master_Typography;
	use Sifency_Addons_Flex_Controls;
	use Sifency_Addons_Help_Controls;

	protected function add_sifency_addons_trio_text_style_controls() {
		$this->start_controls_section(
			'section_alignment',
			array(
				'label' => esc_html__( 'Alignment', 'sifency-addons' ),
			)
		);
		$this->add_responsive_control(
			'trio_text_align',
			array(
				'label'     => esc_html__( 'Alignment', 'sifency-addons' ),
				'type'      => Controls_Manager::CHOOSE,
				'options'   => array(
					'flex-start' => array(
						'title' => esc_html__( 'Left', 'sifency-addons' ),
						'icon'  => 'eicon-text-align-left',
					),
					'center'     => array(
						'title' => esc_html__( 'Center', 'sifency-addons' ),
						'icon'  => 'eicon-text-align-center',
					),
					'flex-end'   => array(
						'title' => esc_html__( 'Right', 'sifency-addons' ),
						'icon'  => 'eicon-text-align-right',
					),
				),
				'default'   => 'flex-start',
				'selectors' => array(
					'{{WRAPPER}} .sifency-meta-item' => 'justify-content: {{VALUE}};',
				),
			)
		);
		$this->add_sifency_addons_flex_alignment_controls(
			array(
				'label'    => esc_html__( 'Flex Layout', 'sifency-addons' ),
				'selector' => '.sifency-meta-item',
			)
		);
		$this->end_controls_section();
		$this->add_sifency_addons_master_typography_controls(
			array(
				'prefix'    => 'label_style',
				'label'     => esc_html__( 'Label Style', 'sifency-addons' ),
				'selector'  => '.sifency-label-style',
				'exclude'   => array( 'alignment', 'tabs', 'transition' ),
				'condition' => array( 'show_label' => 'yes' ),
			)
		);
		$this->add_sifency_addons_master_typography_controls(
			array(
				'prefix'     => 'sep_style',
				'label'      => esc_html__( 'Separator Style', 'sifency-addons' ),
				'selector'   => '.sifency-separator-style',
				'color_only' => true,
				'exclude'    => array( 'alignment', 'tabs', 'transition' ),
				'condition'  => array( 'show_separator' => 'yes' ),
			)
		);
		$this->add_sifency_addons_master_typography_controls(
			array(
				'prefix'   => 'meta_style',
				'label'    => esc_html__( 'Dynamic Content', 'sifency-addons' ),
				'selector' => '.sifency-meta-style',
				'exclude'  => array( 'alignment' ),
			)
		);
		$this->add_sifency_addons_help_controls();
	}
}
