/// class PD.Manage.Modules.ClearEventLogDialogCommand

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

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

    setDefaults: function () {
        this.props("id", "event-log/clear-dialog");
        this.props("enabled", true);
        this.props("icon", PD.Path.resolve("~/application/icons/16x16/garbage.png"));
        this.props("label", "Clear Event Log");
        this.props("tooltip", "Clear items from the Event Log.");
    },

    setState: function (state) {
        this._super(state);
    },

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

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

    _showDialog: function (id) {

        PD.Manage.Modules.EventLog.ClearEventLogDialog.open({
            callbacks: {
                ok: function () {

                    PD.context
                        .get_default()
                        .get_events()
                        .publish("eventlog/clear", {});

                }
            }
        });

    }

});