/// class PD.Manage.Modules.GroupsToolbarSegment

PD.Manage.Modules.GroupsToolbarSegment =
PD.Web.UI.Controls.ToolbarSegment.extend({

    //===================================
    // EVENT HANDLERS
    //===================================

    onRegisterItems: function (e) {

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            commandId: "pd/groups:group/create-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            commandId: "pd/groups:group/edit-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            commandId: "pd/groups:group/delete"
        }));

        if (PD.ENVIRONMENT.AUTH_MODE !== 1) {
            return;
        }

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            commandId: "pd/groups:sync/group"
        }));

        e.registerItem(new PD.Web.UI.Controls.CommandButton({
            commandId: "pd/groups:sync/all-groups"
        }));

    }

});