${this.isNameRendered ? this.renderName() : nothing}
${this.isInputRendered() ? this.renderInput() : html``}
`
let pcgSubobject = this.element.nodeElement.entity.getPcgSubobject()
return html`
${pcgSubobject && this.element.entity.getPinObject(pcgSubobject)?.["Properties"]?.["PinStatus"] == "Required"
? html`
`
: nothing}
${this.element.isInput() ? html`${icon}${content}` : html`${content}${icon}`}
`
}
renderIcon() {
if (this.element.nodeElement.entity.isPcg()) {
switch (this.element.entity.getType()) {
case "Any":
return SVGIcon.pcgPin
case "Param":
case "Param[]":
return SVGIcon.pcgParamPin
case "Spatial":
case "Spatial[]":
return SVGIcon.pcgSpatialPin
case "Any[]":
case "Point[]":
case "Surface[]":
case "Volume[]":
if (this.element.isOutput()) {
return SVGIcon.pcgPin
}
case "Point":
case "Surface":
case "Volume":
return SVGIcon.pcgStackPin
}
}
switch (this.element.entity.PinType.ContainerType?.toString()) {
case "Array": return SVGIcon.arrayPin
case "Set": return SVGIcon.setPin
case "Map": return SVGIcon.mapPin
}
if (this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase() == "delegate") {
return SVGIcon.delegate
}
if (this.element.nodeElement?.template instanceof VariableOperationNodeTemplate) {
return SVGIcon.operationPin
}
if (this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase() == "statictype") {
return SVGIcon.staticPin
}
return SVGIcon.genericPin
}
renderName() {
let name = this.element.getPinDisplayName()
const nodeElement = this.element.nodeElement
const pinName = this.element.getPinName()
if (
nodeElement.getType() == Configuration.paths.makeStruct
&& pinName == nodeElement.entity.StructType.getName()
) {
name = pinName
}
return html`