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

    use BBE\Customizer\Base as Base;
    
    if( ! class_exists( __NAMESPACE__ . '\\Number' ) ) {
        /**
         * Number Class
         */
        class Number extends Base {
            /**
             * Type of control
             * 
             * @since 1.0.0
             * @var string
             */
            public $type = 'bbe-number';

            /**
             * Is this control responsive
             * 
             * @since 1.0.0
             * @var bool
             */
            public $responsive = false;

            /**
             * Is this control responsive
             * 
             * @since 1.0.0
             * @var array
             */
            public $input_attrs = [];

            /**
             * Whether to show unit or not
             * 
             * @since 1.0.0
             * @var array
             */
            public $show_unit = true;

            /**
             * To json
             * 
             * @since 1.0.0
             */
            public function to_json() {
                parent::to_json();
                $this->json[ 'responsive' ] = $this->responsive;
                $this->json[ 'input_attrs' ] = $this->input_attrs;
                $this->json[ 'show_unit' ] = $this->show_unit;
            }
        }
        Number::set_control_type( 'bbe-number' );
    }