import { unsafeCSS, LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import { customElement } from "../../decorator.js";
import componentStyle from "./alert-floating-item.css.js";
import { ObcFloatingItemType, ObcFloatingItemDirection, ObcFloatingItemLineType } from "../floating-item/floating-item.js";
import "../../icons/icon-alarm-unacknowledged-iec.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 ObcAlertFloatingItem = class extends LitElement {
  constructor() {
    super(...arguments);
    this.type = ObcFloatingItemType.Regular;
    this.direction = ObcFloatingItemDirection.horizontal;
    this.hasTimestamp = false;
    this.hasDay = false;
    this.action = false;
    this.action2 = false;
    this.lineType = ObcFloatingItemLineType.singleLine;
  }
  render() {
    const isApplication = this.type === ObcFloatingItemType.Application;
    return html`
      <obc-floating-item
        .type=${this.type}
        .direction=${this.direction}
        .hasTimestamp=${this.hasTimestamp}
        .hasDay=${this.hasDay}
        .action=${this.action}
        .action2=${this.action2}
        .lineType=${this.lineType}
        @action-click=${(e) => this.dispatchEvent(
      new CustomEvent("action-click", { detail: e.detail })
    )}
        @action2-click=${(e) => this.dispatchEvent(
      new CustomEvent("action2-click", { detail: e.detail })
    )}
        @dismiss-click=${(e) => this.dispatchEvent(
      new CustomEvent("dismiss-click", { detail: e.detail })
    )}
      >
        ${isApplication ? html`
              <slot name="primary-icon" slot="primary-icon"></slot>
              <obi-alarm-unacknowledged-iec
                slot="secondary-icon"
                useCssColor
              ></obi-alarm-unacknowledged-iec>
            ` : html`
              <obi-alarm-unacknowledged-iec
                slot="primary-icon"
                useCssColor
              ></obi-alarm-unacknowledged-iec>
            `}
        <slot name="title" slot="title"></slot>
        <slot name="description" slot="description"></slot>
        <slot name="time" slot="time"></slot>
        <slot name="day" slot="day"></slot>
        <slot name="action" slot="action"></slot>
        <slot name="action2" slot="action2"></slot>
      </obc-floating-item>
    `;
  }
};
ObcAlertFloatingItem.styles = unsafeCSS(componentStyle);
__decorateClass([
  property({ type: String })
], ObcAlertFloatingItem.prototype, "type", 2);
__decorateClass([
  property({ type: String })
], ObcAlertFloatingItem.prototype, "direction", 2);
__decorateClass([
  property({ type: Boolean })
], ObcAlertFloatingItem.prototype, "hasTimestamp", 2);
__decorateClass([
  property({ type: Boolean })
], ObcAlertFloatingItem.prototype, "hasDay", 2);
__decorateClass([
  property({ type: Boolean })
], ObcAlertFloatingItem.prototype, "action", 2);
__decorateClass([
  property({ type: Boolean })
], ObcAlertFloatingItem.prototype, "action2", 2);
__decorateClass([
  property({ type: String })
], ObcAlertFloatingItem.prototype, "lineType", 2);
ObcAlertFloatingItem = __decorateClass([
  customElement("obc-alert-floating-item")
], ObcAlertFloatingItem);
export {
  ObcAlertFloatingItem
};
//# sourceMappingURL=alert-floating-item.js.map
