<?php
    /**
     * A class to render custom select control
     * 
     * @package Blog Bee
     * @since 1.0.0
     */
    namespace BBE\Customizer\Controls;

    use BBE\Customizer\Base as Base;

    if( ! class_exists( __NAMESPACE__ . '\\Select' ) ) {
        /**
         * Select class
         */
        class Select extends Base {
            /**
             * Control type
             * 
             * @since 1.0.0
             */
            public $type = 'bbe-select';

            /**
             * Choices
             * 
             * @since 1.0.0
             */
            public $choices = [];

            /**
             * To json
             * 
             * @since 1.0.0
             */
            public function to_json() {
                parent::to_json();
                $this->json[ 'choices' ] = $this->choices;
            }
        }
        Select::set_control_type( 'bbe-select' );
    }