<?php
    /**
     * Multiselect customzer custom control
     * 
     * @package Blog Bee
     * @since 1.0.0
     */
    namespace BBE\Customizer\Controls;

    use BBE\Customizer\Base as Base;
    
    if( ! class_exists( __NAMESPACE__ . '\\Multiselect' ) ) {
        /**
         * Multiselect Class
         */
        class Multiselect extends Base {
            /**
             * Type of control
             * 
             * @since 1.0.0
             */
            public $type = 'multiselect';

            /**
             * The options to show in dropdown
             * 
             * @since 1.0.0
             * @var array
             */
            public $fields = [];

            /**
             * To json
             * 
             * @since 1.0.0
             */
            public function to_json() {
                parent::to_json();
                $this->json[ 'fields' ] = $this->fields;
            }
        }
        Multiselect::set_control_type( 'multiselect' );
    }