<?php 

    // prevent direct file access
	if( !defined( 'ABSPATH' ) ) exit;
    
    class Pixe_Preset{

        static function get_icon_class(){
            return '';
        }

        static function get_icon(){
            return '';
        }

        static function get_value(){
            return array();
        }

    }

    if( is_admin() ){

        // default container preset
        class Pixe_Container_Preset_1 extends Pixe_Preset{

            static function get_icon_class(){
                return 'pixe-style-wrapper pixe-style-preset';
            }

            static function get_icon(){
                return '<div class="pixe-style-column" style="flex-grow: 1" >1/2</div><div class="pixe-style-column" style="flex-grow: 1" >1/2</div>';
            }

            static function get_value(){
                return array(
                    array(
                        '_type' => 'wrapper',
                        '_elements' => array(
                            array( '_type' => 'column', 'width' => '1/2' ),
                            array( '_type' => 'column', 'width' => '1/2' )
                        )
                    )
                );
            }

        }
        Pixe_Builder::register_container('Pixe_Container_Preset_1');

        class Pixe_Container_Preset_2 extends Pixe_Preset{

            static function get_icon_class(){
                return 'pixe-style-wrapper pixe-style-preset';
            }

            static function get_icon(){
                return '<div class="pixe-style-column" style="flex-grow: 1" >1/3</div><div class="pixe-style-column" style="flex-grow: 1" >1/3</div><div class="pixe-style-column" style="flex-grow: 1" >1/3</div>';
            }

            static function get_value(){
                return array(
                    array(
                        '_type' => 'wrapper',
                        '_elements' => array(
                            array( '_type' => 'column', 'width' => '1/3' ),
                            array( '_type' => 'column', 'width' => '1/3' ),
                            array( '_type' => 'column', 'width' => '1/3' )
                        )
                    )
                );
            }

        }
        Pixe_Builder::register_container('Pixe_Container_Preset_2');

        class Pixe_Container_Preset_3 extends Pixe_Preset{

            static function get_icon_class(){
                return 'pixe-style-wrapper pixe-style-preset';
            }

            static function get_icon(){
                return '<div class="pixe-style-column" style="flex-grow: 1" >1/4</div><div class="pixe-style-column" style="flex-grow: 1" >1/4</div><div class="pixe-style-column" style="flex-grow: 1" >1/4</div><div class="pixe-style-column" style="flex-grow: 1" >1/4</div>';
            }

            static function get_value(){
                return array(
                    array(
                        '_type' => 'wrapper',
                        '_elements' => array(
                            array( '_type' => 'column', 'width' => '1/4' ),
                            array( '_type' => 'column', 'width' => '1/4' ),
                            array( '_type' => 'column', 'width' => '1/4' ),
                            array( '_type' => 'column', 'width' => '1/4' )
                        )
                    )
                );
            }

        }
        Pixe_Builder::register_container('Pixe_Container_Preset_3');

        class Pixe_Container_Preset_4 extends Pixe_Preset{

            static function get_icon_class(){
                return 'pixe-style-wrapper pixe-style-preset';
            }

            static function get_icon(){
                return '<div class="pixe-style-column" style="flex-grow: 1" >1/5</div><div class="pixe-style-column" style="flex-grow: 1" >1/5</div><div class="pixe-style-column" style="flex-grow: 1" >1/5</div><div class="pixe-style-column" style="flex-grow: 1" >1/5</div><div class="pixe-style-column" style="flex-grow: 1" >1/5</div>';
            }

            static function get_value(){
                return array(
                    array(
                        '_type' => 'wrapper',
                        '_elements' => array(
                            array( '_type' => 'column', 'width' => '1/5' ),
                            array( '_type' => 'column', 'width' => '1/5' ),
                            array( '_type' => 'column', 'width' => '1/5' ),
                            array( '_type' => 'column', 'width' => '1/5' ),
                            array( '_type' => 'column', 'width' => '1/5' )
                        )
                    )
                );
            }

        }
        Pixe_Builder::register_container('Pixe_Container_Preset_4');

        class Pixe_Container_Preset_5 extends Pixe_Preset{

            static function get_icon_class(){
                return 'pixe-style-wrapper pixe-style-preset';
            }

            static function get_icon(){
                return '<div class="pixe-style-column" style="flex-grow: 1" >1/3</div><div class="pixe-style-column" style="flex-grow: 2" >2/3</div>';
            }

            static function get_value(){
                return array(
                    array(
                        '_type' => 'wrapper',
                        '_elements' => array(
                            array( '_type' => 'column', 'width' => '1/3' ),
                            array( '_type' => 'column', 'width' => '2/3' )
                        )
                    )
                );
            }

        }
        Pixe_Builder::register_container('Pixe_Container_Preset_5');

        class Pixe_Container_Preset_6 extends Pixe_Preset{

            static function get_icon_class(){
                return 'pixe-style-wrapper pixe-style-preset';
            }

            static function get_icon(){
                return '<div class="pixe-style-column" style="flex-grow: 1" >1/4</div><div class="pixe-style-column" style="flex-grow: 3" >3/4</div>';
            }

            static function get_value(){
                return array(
                    array(
                        '_type' => 'wrapper',
                        '_elements' => array(
                            array( '_type' => 'column', 'width' => '1/4' ),
                            array( '_type' => 'column', 'width' => '3/4' )
                        )
                    )
                );
            }

        }
        Pixe_Builder::register_container('Pixe_Container_Preset_6');
    }