/// class PD.Manage.Modules.ObjectModel.ProcessCreateDialogCommand

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

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

    setDefaults: function () {

        this.props("id", "process/create-dialog");
        this.props("enabled", true);
        this.props("icon", PD.Path.to16x16("PLUS.PNG"));
        this.props("label", "New");
        this.props("tooltip", "Create a new Process.");

    },

    execute: function (e) {
        this._super(e);
        this._showDialog();
    },

    //===================================
    // PRIVATE METHODS
    //===================================

    _showDialog: function () {

        ProspectDirector.Modules.Processes.ProcessCreateDialog.Dialog.show({
            callbacks: {
                ok: function (sender, e) {
                    PD.context.get_default().get_events().publish("process/create", {
                        id: e.id
                    });
                }
            }
        });

    }

});