import { PinEntity } from "../../dist/ueblueprint"
import Template from "./Template"
export default class NodeTemplate extends Template {
/**
* Computes the html content of the target element.
* @param {HTMLElement} entity Entity representing the element
* @returns The computed html
*/
header(entity) {
return `
`
}
/**
* Computes the html content of the target element.
* @param {import("../entity/ObjectEntity").default} entity Entity representing the element
* @returns The computed html
*/
body(entity) {
let inputs = entity.CustomProperties.filter(v => v instanceof PinEntity)
let outputs = inputs.filter(v => v.isOutput())
inputs = inputs.filter(v => !v.isOutput())
return `
${outputs.map((output, index) => `
${output.name}
`).join("") ?? ''}
`
}
/**
* Computes the html content of the target element.
* @param {HTMLElement} entity Entity representing the element
* @returns The computed html
*/
render(entity) {
return `