/// class PD.Manage.Modules.DocumentTypeCreateDialogCommand

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

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

    setDefaults: function () {

        this.props("id", "document-type/create-dialog");
        this.props("enabled", true);
        this.props("icon", PD.Path.to16x16("plus.png"));
        this.props("label", "New");
        this.props("tooltip", "Create a new Document Type.");

    },

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

        PDJS.Shared.Features.FeatureDialogForNhib.open({
            title: "New Document Type",
            height: "550px",
            width: "550px",
            args: {
                targetType: "ProspectDirector.Web.Shared.Modules.DocumentTypes.DocumentTypeUIO",
                arbiterType: "ProspectDirector.Web.Manage.Modules.DocumentTypes.DocumentTypeArbiter"
            },
            callbacks: {
                "ok": (sender, e) => {

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

                }
            }
        });

    }

});