<?php

namespace Aepro\Modules\TaxonomyBlocks\Widgets;

use Aepro\Aepro;
use Elementor\Group_Control_Background;
use Elementor\Group_Control_Box_Shadow;
use Aepro\Base\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Typography;
use Elementor\Utils;
use Elementor\Plugin;
use ElementorPro\Modules\Woocommerce\Widgets\Elements;
use WP_Query;
use Aepro\Modules\TaxonomyBlocks\Skins;


class AeTaxonomyBlocks extends Widget_Base{

    public function get_name() {
        return 'ae-taxonomy-blocks';
    }

    public function get_title() {
        return __( 'AE - Taxonomy Blocks', 'ae-pro' );
    }

    public function get_icon() {
        return 'eicon-post-list';
    }

    public function get_categories() {
        return [ 'ae-template-elements' ];
    }

    protected function _register_skins() {
        $this->add_skin( new Skins\Skin_Classic($this));
        $this->add_skin( new Skins\Skin_Card ($this));
        $this->add_skin( new Skins\Skin_List($this));

    }

    protected function _register_controls()
    {

        $ae_taxonomies = Aepro::$_helper->get_rules_taxonomies();
        $ae_taxonomies_options = $ae_taxonomies;
        $ae_taxonomies_options['child_of_current'] = __( 'Child of Current','ae-pro' );

        $this->start_controls_section(
            'section_query',
            [
                'label' => __( 'Query', 'ae-pro' ),
            ]
        );
        $this->add_control(
            'ae_taxonomy',
            [
                'label'         => __('Source','ae-pro'),
                'type'          => Controls_Manager::SELECT,
                'options'       => $ae_taxonomies_options,
                'default' => key( $ae_taxonomies ),
            ]
        );

        $this->add_control(
            'show_hide_empty',
            [
                'label' => __('Hide Empty', 'ae-pro'),
                'type'  => Controls_Manager::SWITCHER,
                'label_off' => __( 'No', 'bpel' ),
                'label_on' => __( 'Yes', 'bpel' ),
                'return_value' => 'yes',
                'default' => '',
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'section_layout',
            [
                'label' => __('Layout', 'ae-pro'),
                'tab'   => Controls_Manager::TAB_CONTENT
            ]
        );

        //$this->title_controls();
        //$this->overlay_controls();
        //$this->image_controls();
        //$this->count_controls();

        $this->end_controls_section();

    }



    protected function render()
    {
        $settings   =   $this->get_settings();
        parent::render(); // TODO: Change the autogenerated stub
    }

    protected $_has_template_content = false;

}