<?php
    /**
     * Icon Picker Control
     * 
     * @package Blog Bee
     * @see BBE\Customizer\Base
     * @since 1.0.0
     */
    namespace BBE\Customizer\Controls;

    use BBE\Customizer\Base as Base;
    
    if( ! class_exists( __NAMESPACE__. '\\Icon_Picker' ) ) {
        /**
         * Icon Picker Class
         */
        class Icon_Picker extends Base {
            /**
             * Type of control
             * 
             * @since 1.0.0
             */
            public $type = 'icon-picker';

            /**
             * Recommended icons
             * 
             * @since 1.0.0
             */
            public $recommended_icons = [];

            /**
             * Fields to exclude
             * 
             * @since 1.0.0
             */
            public $exclude = [];

            /**
             * Take entire width and the control in a seperate line from title and description
             * 
             * @since 1.0.0
             */
            public $display_block = false;

            /**
             * Send values to js
             * 
             * @since 1.0.0
             * @override
             */
            public function to_json() {
                parent::to_json();
                $this->json[ 'exclude' ] = $this->exclude;
                $this->json[ 'display_block' ] = $this->display_block;
                $this->json[ 'recommended_icons' ] = $this->recommended_icons;
            }
        }
        Icon_Picker::set_control_type( 'icon-picker' );
    }