/// class PD.Manage.Modules.GroupCreateDialogCommand

PD.Manage.Modules.GroupCreateDialogCommand =
PD.Commands.Command.extend({

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

    setDefaults: function () {
        this.props("id", "group/create-dialog");
        this.props("enabled", true);
        this.props("icon", PD.Path.to16x16("plus.png"));
        this.props("label", "New Group");
        this.props("tooltip", "Create a new Group.");
    },

    execute: function (e) {
        this._super(e);

        ProspectDirector.Web.UI.FeatureSets.NHibTargetEditorDialog.open({
            config: {
                title: "New Group"
            },
            data: {
                layoutType: ProspectDirector.Web.UI.FeatureSets.Layouts.TabStripLayout,
                targetArbiter: "ProspectDirector.Web.Manage.Modules.Security.GroupArbiter",
                targetType: "ProspectDirector.Web.Manage.Modules.Security.GroupUIO"
            },
            callbacks: {
                ok: function (sender, e) {

                    PD.context.get_default().get_events().publish("group/create", {
                        id: e.target.id
                    });

                }
            }
        });

    }

});