/// class PD.Manage.Modules.SelectionListCreateDialogCommand

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

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

    setDefaults: function () {

        this.props("id", "selection-list/create-dialog");
        this.props("enabled", true);
        this.props("icon", PD.Path.to16x16("plus.png"));
        this.props("label", "New");
        this.props("tooltip", "Create a new Selection List.");

    },

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

        PDJS.Shared.Features.FeatureDialogForNhib.open({
            title: "New Selection List",
            height: "450px",
            width: "450px",
            args: {
                targetType: "ProspectDirector.Web.Manage.Modules.Extensions.SelectionListUIO",
                arbiterType: "ProspectDirector.Web.Manage.Modules.Extensions.SelectionListArbiter"
            },
            callbacks: {
                "ok": (sender, e) => {

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

                }
            }
        });

    }

});