/// class PD.Web.UI.Controls.ButtonGroup
/// using PD.Web.UI.Controls.Item

PD.Web.UI.Controls.ButtonGroup =
PD.Web.UI.Controls.Button.extend({

    //===================================
    // FIELDS
    //===================================

    _buttons: null,

    //===================================
    // CONSTRUCTOR
    //===================================

    init: function (options) {
        this._buttons = new PD.BCL.List();
        this._super(options);
        this.data().add("type", "buttonGroup");
    },

    //===================================
    // PROPERTIES
    //===================================

    get_buttons: function () {
        return this._buttons;
    },

    refreshContext: function (e) {
        this._menu = e.menu;
        this._context = e.context;
    },

    //===================================
    // PUBLIC METHODS
    //===================================

    getSettings: function () {

        var result = {
            type: "button",
            id: this.data("id"),
            enable: this.data("enable"),
            imageUrl: this.data("icon"),
            overflow: this.data("overflow"),
            text: this.data("text"),
            attributes: {
                "data-id": this.get_uid()
            }
        }

        return result;

    }

});