import { unsafeCSS, LitElement, nothing, html } from "lit";
import { property } from "lit/decorators.js";
import compentStyle from "./advice-menu-item.css.js";
import { ObcMessageMenuItemSize } from "../message-menu-item/message-menu-item.js";
import "../../icons/icon-notification-advice-active.js";
import { customElement } from "../../decorator.js";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result) __defProp(target, key, result);
  return result;
};
let ObcAdviceMenuItem = class extends LitElement {
  constructor() {
    super(...arguments);
    this.hasIcon = false;
    this.title = "";
    this.description = "";
    this.day = "";
    this.time = "";
    this.open = false;
    this.size = ObcMessageMenuItemSize.SingleLine;
    this.primaryActionLabel = "";
    this.secondaryActionLabel = "";
  }
  handleMessageClick() {
    this.open = !this.open;
    this.dispatchEvent(
      new CustomEvent("item-click", {
        detail: { open: this.open },
        bubbles: true,
        composed: true
      })
    );
  }
  render() {
    return html`
      <obc-message-menu-item
        .title=${this.title}
        .description=${this.description}
        .day=${this.day}
        .time=${this.time}
        .primaryActionLabel=${this.primaryActionLabel}
        .secondaryActionLabel=${this.secondaryActionLabel}
        .size=${this.size}
        .open=${this.open}
        .hasSecondaryIcon=${this.hasIcon}
        hasPrimaryIcon
        @message-click=${this.handleMessageClick}
      >
        <obi-notification-advice-active
          slot="primary-icon"
          style="color: var(--instrument-starboard-primary-color)"
        ></obi-notification-advice-active>
        ${this.hasIcon ? html`<slot name="icon" slot="secondary-icon"></slot>` : nothing}
      </obc-message-menu-item>
    `;
  }
};
ObcAdviceMenuItem.styles = unsafeCSS(compentStyle);
__decorateClass([
  property({ type: Boolean })
], ObcAdviceMenuItem.prototype, "hasIcon", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "title", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "description", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "day", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "time", 2);
__decorateClass([
  property({ type: Boolean })
], ObcAdviceMenuItem.prototype, "open", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "size", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "primaryActionLabel", 2);
__decorateClass([
  property({ type: String })
], ObcAdviceMenuItem.prototype, "secondaryActionLabel", 2);
ObcAdviceMenuItem = __decorateClass([
  customElement("obc-advice-menu-item")
], ObcAdviceMenuItem);
export {
  ObcAdviceMenuItem
};
//# sourceMappingURL=advice-menu-item.js.map
