/// 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);

        PDJS.Shared.Features.FeatureDialogForNhib.open({
            title: "New Group",
            args: {
                targetType: "ProspectDirector.Web.Manage.Modules.Security.GroupUIO",
                arbiterType: "ProspectDirector.Web.Manage.Modules.Security.GroupArbiter"
            },
            callbacks: {
                "ok": (sender, e) => {

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

                }
            }
        }, {
            height: 550,
            width: 650,
        });

    }

});