<?php

namespace VougeElementor\Widgets;
use VougeElementor\Widgets\Vouge_Shop_Widget_Product_Summary;
use Elementor\Widget_Base;
use Elementor\Controls_Manager;


class Vouge_Shop_Widget_Product_Summary_Extend extends Vouge_Shop_Widget_Product_Summary {

	function dynamic_register_controls() {

		$this->start_controls_section( 'product_summary_extend_section', array(
			'label' => esc_html__( 'Social Options', 'vouge-pro' ),
		) );

			$this->add_control( 'share_follow_type', array(
				'label'   => esc_html__( 'Share / Follow Type', 'vouge-pro' ),
				'type'    => Controls_Manager::SELECT,
				'default' => 'share',
				'options' => array(
					''       => esc_html__('None', 'vouge-pro'),
					'share'  => esc_html__('Share', 'vouge-pro'),
					'follow' => esc_html__('Follow', 'vouge-pro'),
				),
				'description' => esc_html__( 'Choose between Share / Follow you would like to use.', 'vouge-pro' ),
			) );

			$this->add_control( 'social_icon_style', array(
				'label'   => esc_html__( 'Social Icon Style', 'vouge-pro' ),
				'type'    => Controls_Manager::SELECT,
				'default' => '',
				'options' => array(
					'simple'        => esc_html__( 'Simple', 'vouge-pro' ),
					'bgfill'        => esc_html__( 'BG Fill', 'vouge-pro' ),
					'brdrfill'      => esc_html__( 'Border Fill', 'vouge-pro' ),
					'skin-bgfill'   => esc_html__( 'Skin BG Fill', 'vouge-pro' ),
					'skin-brdrfill' => esc_html__( 'Skin Border Fill', 'vouge-pro' ),
				),
				'description' => esc_html__( 'This option is applicable for all buttons used in product summary.', 'vouge-pro' ),
				'condition'   => array( 'share_follow_type' => array ('share', 'follow') )
			) );

			$this->add_control( 'social_icon_radius', array(
				'label'   => esc_html__( 'Social Icon Radius', 'vouge-pro' ),
				'type'    => Controls_Manager::SELECT,
				'default' => '',
				'options' => array(
					'square'  => esc_html__( 'Square', 'vouge-pro' ),
					'rounded' => esc_html__( 'Rounded', 'vouge-pro' ),
					'circle'  => esc_html__( 'Circle', 'vouge-pro' ),
				),
				'condition'   => array(
					'social_icon_style' => array ('bgfill', 'brdrfill', 'skin-bgfill', 'skin-brdrfill'),
					'share_follow_type' => array ('share', 'follow')
				),
			) );

			$this->add_control( 'social_icon_inline_alignment', array(
				'label'        => esc_html__( 'Social Icon Inline Alignment', 'vouge-pro' ),
				'type'         => Controls_Manager::SWITCHER,
				'label_on'     => esc_html__( 'yes', 'vouge-pro' ),
				'label_off'    => esc_html__( 'no', 'vouge-pro' ),
				'default'      => '',
				'return_value' => 'true',
				'description'  => esc_html__( 'This option is applicable for all buttons used in product summary.', 'vouge-pro' ),
				'condition'   => array( 'share_follow_type' => array ('share', 'follow') )
			) );

		$this->end_controls_section();

	}

}