(function($){
    "use strict";

    $.pixeVariableSettings = {

        tabHead: false,
        tabContent: false,

        // initiate content
        init: function(settings){
            settings = $.extend({
                onClose: function(){}
            }, settings);

            var t = this;

            var container = $('<div class="pixe-variable-settings pixe-box-sizing" ></div>');

            var tab = $('<div class="pixe-settings-tab" ></div>');
            tab.appendTo(container);

            // init header area
            t.tabHead = $('<div class="pixe-settings-tab-head" ></div>');
            t.tabHead.append(pixei18n.preset.variable);
            t.tabHead.append($.pixeGetAdminIcon('cancel', { class: 'pixe-close' }));
            tab.append(t.tabHead);
            
            // init content area
            t.tabContent = $('<div class="pixe-settings-tab-content" ></div>');
            t.getPresetTab();
            tab.append(t.tabContent);
            
            // popup
            var lb = new $.pixeLightboxPopup({
                class: 'pixe-lb-variable-settings',
                content: container,
                onClose: settings.onClose
            });
            t.tabHead.on('click', '.pixe-close', function(){
                lb.close();
            });

        },

        // preset tab
        getPresetTab: function(){
            var t = this;
            t.tabContent.empty();
            
            var content = $('<div class="pixe-settings-tab-notice" ></div>');
            content.append($.pixeProNotice('feature', 'variables'));
            content.appendTo(t.tabContent);
        },
    };

})(jQuery);	