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

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

            /**
             * Fields to include
             * 
             * @since 1.0.0
             * @var array
             */
            public $fields = [];

            /**
             * Direction of reorder
             * 
             * @since 1.0.0
             */
            public $direction = 'vertical';

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