/// class PD.Manage.Modules.UserCreateDialogCommand

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

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

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

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

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

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

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

    }

});