/// class PD.Manage.Modules.ObjectModel.ExpressionAssignmentCommand

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

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

    setDefaults: function () {

        this.props("id", "entity-type/expression-assignment");
        this.props("enabled", true);
        this.props("icon", Jade.IconSet.get("pdv2").resolve("formula.png", Jade.IconSetSizeSpecificDirectory.x16));
        this.props("label", "Expressions");
        this.props("tooltip", "Assign expressions to explorer model folders of the selected entity type. <br/><br/> Expressions control the visibility of explorer model folders based on the presence or absence of tags on an entity.");

        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.EntityTypes.ExpressionAssignmentDialog.open({
            title: entityTypeName + " Expression Assignment",
            entityTypeId: entityTypeId
        });

    }

});