import { LitElement, html } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { styles } from '../styles/styles'; import '@shoelace-style/shoelace/dist/themes/light.css'; import SlButton from '@shoelace-style/shoelace/dist/components/button/button.component.js'; import SlTooltip from '@shoelace-style/shoelace/dist/components/tooltip/tooltip.component.js'; import SlAlert from '@shoelace-style/shoelace/dist/components/alert/alert.component.js'; import { Graph } from '../graph'; import { biExclamationOctagon, biInfo } from '../styles/icons'; import { styleMap } from 'lit/directives/style-map.js'; @customElement('webwriter-automaton-infomenu') export class InfoMenu extends LitElement { @property({ type: Boolean, attribute: false }) private accessor infoCardOpen = false; @property({ type: Object, attribute: false }) private accessor _graph!: Graph; public set graph(graph: Graph) { this._graph = graph; } public static get styles() { return styles; } public static get scopedElements() { return { 'sl-button': SlButton, 'sl-tooltip': SlTooltip, 'sl-alert': SlAlert, }; } render() { const def = this._graph?.automaton.getFormalDefinition(); if (!def) { return html``; } return html`
`; } }