Plugins.ThreeGiG.ProspectDirector.BuiltIn.CreateEntityAction =
PD.Actions.ActionDefinition.extend({

    init: function (options) {

        this._super({
            id: "create-entity",
            pluginId: "builtin",
            name: "Create Entity",
            description: "Opens the Entity Create dialog.",
            parameters: [
                new PD.Actions.ActionParameterDefinition({
                    name: "Entity Type ID",
                    type: PD.Actions.ActionParameterType.INTEGER,
                    description: "The ID of the entity type that will be created upon successful completion of the Entity Create Dialog."
                }),
                new PD.Actions.ActionParameterDefinition({
                    name: "Parent Entity ID",
                    type: PD.Actions.ActionParameterType.INTEGER,
                    description: "The ID of the parent entity that upon successful completion of the Entity Create Dialog the newly created entity will be assigned.",
                    optional: true
                })
            ]
        });

    },

    method: function (entityTypeId, entityParentId) {

        PDJS.Entities.EntityDialogs.showCreate({
            entityTypeId: entityTypeId,
            parentId: entityParentId
        });

    }

});