/** @license Copyright (c) 2024 trading_peter This program is available under Apache License Version 2.0 */ import './tp-flow-node-port.js'; import { LitElement, html, css } from 'lit'; // tp-flow-node.js export class TpFlowNode extends LitElement { static get styles() { return [ css` :host { display: block; position: absolute; background: #2b2b2b; border-radius: 4px; color: #fff; min-width: 150px; } .node-body { display: grid; grid-template-columns: 20px 1fr 20px; } .node-content { padding: 20px; } .node-ports { justify-content: space-between; padding: 8px; } .input-ports, .output-ports { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; justify-content: space-evenly; } .output-ports { align-items: flex-end; } header { display: flex; align-items: center; column-gap: 10px; padding: 2px 5px; } .delete-btn { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; } .delete-btn:hover { opacity: 1; } ` ]; } render() { return html` ${this.renderNodeHeader()}