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

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

            /**
             * Responsive control id
             * 
             * @var string
             * @since 1.0.0
             */
            public $responsive_control_id = '';

            /**
             * Builder widgets
             * 
             * @var array
             * @since 1.0.0
             */
            public $widgets = [];

            /**
             * Row section ids
             * 
             * @var array
             * @since 1.0.0
             */
            public $row_section_ids = [];

            /**
             * Layout
             * 
             * @var array
             * @since 1.0.0
             */
            public $layout = [];

            /**
             * To json
             * 
             * @since 1.0.0
             */
            public function to_json() {
                parent::to_json();
                $this->json[ 'layout' ] = $this->layout;
                $this->json[ 'widgets' ] = $this->widgets;
                $this->json[ 'row_section_ids' ] = $this->row_section_ids;
                $this->json[ 'responsive_control_id' ] = $this->responsive_control_id;
            }
        }
        Builder::set_control_type( 'bbe-builder' );
    }