/// class PD.Manage.Modules.ObjectModel.ConfigureSearchGroupsCommand

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

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

    setDefaults: function () {

        this.props("id", "entity-type/configure-search-groups");
        this.props("enabled", true);
        this.props("icon", PD.Path.to16x16("magnifying_glass.PNG"));
        this.props("label", "Search Groups");
        this.props("tooltip", "Configure Search Groups for the selected Entity Type.<br/><br/>Search groups control what data associated with this Entity Type is available for inclusion in Views and Charts.");

        this.state("entityTypeId", null);
        this.state("entityTypeName", null);

    },

    setState: function (state) {
        this._super(state);
        this.props("enabled", this.state("entityTypeId") != null)
    },

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

        var entityTypeId = this.state("entityTypeId"),
            entityTypeName = this.state("entityTypeName");

        PDJS.Manage.Views.SearchGroupsDialog.open({
            title: entityTypeName + " Search Groups",
            entityTypeId: entityTypeId
        });

    }

});