import {LitElement, html, unsafeCSS} from 'lit'; import {customElement, property} from 'lit/decorators.js'; import compentStyle from './alert-menu.css?inline'; import '../button/button'; import '../card-list-button/card-list-button'; import '../../icons/icon-chevron-right-google'; import '../../icons/icon-alert-list'; import {localized, msg} from '@lit/localize'; /** * * @fires ack-all-click - Fired when the ack button is clicked * @fires alert-list-click - Fired when the alert list button is clicked */ @localized() @customElement('obc-alert-menu') export class ObcAlertMenu extends LitElement { @property({type: Boolean}) empty: boolean = false; override render() { return html`
${msg('Active alerts')}
${this.empty ? null : html` this.dispatchEvent(new CustomEvent('ack-all-click'))} > ${msg('ACK ALL')} `}
${this.empty ? html`
${msg('No active alerts')}
` : null}
{ this.dispatchEvent(new CustomEvent('alert-list-click')); }} > ${msg('Alert list')}
`; } static override styles = unsafeCSS(compentStyle); } declare global { interface HTMLElementTagNameMap { 'obc-alert-menu': ObcAlertMenu; } }