/// class PD.Manage.Modules.ObjectModel.EntityTypeCreateDialogCommand

PD.Manage.Modules.ObjectModel.EntityTypeCreateDialogCommand =
PD.Commands.Command.extend({

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

    setDefaults: function () {
        this.props("id", "entity-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 Entity Type.");
    },

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

        ProspectDirector.Modules.EntityTypes.Dialog.EntityTypeNew.show({
            callbacks: {
                ok: function (sender, e) {
                    PD.context.get_default().get_events().publish("entity-type/create", {
                        id: e.id,
                        name: e.name
                    });
                }
            }
        });

    }

});