/// 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);

        ProspectDirector.Web.UI.FeatureSets.NHibTargetEditorDialog.open({
            config: {
                title: "New Selection List",
                height: "450px",
                width: "450px"
            },
            data: {
                targetArbiter: "ProspectDirector.Web.Manage.Modules.Extensions.SelectionListArbiter",
                targetType: "ProspectDirector.Web.Manage.Modules.Extensions.SelectionListUIO",
                layoutType: ProspectDirector.Web.UI.FeatureSets.Layouts.TabStripLayout
            },
            callbacks: {
                ok: function (sender, e) {
                    PD.context
                        .get_default()
                        .get_events()
                        .publish("selection-list/create", {
                            id: e.target.id
                        });
                }
            }
        });

    }

});