import { unsafeCSS, LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import { customElement } from "../../decorator.js";
import componentStyle from "./sequence-modal.css.js";
import { SequenceValue, SequenceType, SequenceStyle } from "../sequence-step/sequence-step.js";
import "../icon-button/icon-button.js";
import "../../icons/icon-close-google.js";
import { ObcSequenceCardTitleType, ObcSequenceCardSize, ObcSequenceCardProgressType, ObcSequenceCardState } from "../sequence-card/sequence-card.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;
};
var ObcSequenceModalType = /* @__PURE__ */ ((ObcSequenceModalType2) => {
  ObcSequenceModalType2["Regular"] = "regular";
  ObcSequenceModalType2["TwoLine"] = "two-line";
  return ObcSequenceModalType2;
})(ObcSequenceModalType || {});
let ObcSequenceModal = class extends LitElement {
  constructor() {
    super(...arguments);
    this.type = "regular";
    this.stepLabel = "";
    this.stepValue = SequenceValue.notStarted;
    this.modalTitle = "";
    this.subtitle = "";
    this.hasTimeStamp = false;
    this.timeValue = "";
    this.timeLabel = "";
    this.hasActions = false;
    this.closeLabel = "Close";
    this.onCloseClick = () => this.dispatchEvent(new CustomEvent("close-click"));
  }
  get isTwoLine() {
    return this.type === "two-line";
  }
  render() {
    const titleType = ObcSequenceCardTitleType.TwoLine;
    const subtitle = this.isTwoLine ? this.subtitle : "";
    return html`
      <div class="sequence-modal type-${this.type}">
        <obc-sequence-card
          class="sequence-modal-card"
          .size=${ObcSequenceCardSize.Regular}
          .titleType=${titleType}
          .progressType=${ObcSequenceCardProgressType.Centered}
          .state=${ObcSequenceCardState.Active}
          .fullWidth=${true}
          .fullHeight=${true}
          .horizontal=${false}
          .showConnector=${false}
          .hasLeadingIcon=${false}
          .cardTitle=${this.modalTitle}
          .subtitle=${subtitle}
          .hasTimeStamp=${this.hasTimeStamp}
          .timeLabel=${this.timeLabel}
          .time=${this.timeValue}
          .hasContent=${true}
          .hasActions=${this.hasActions}
          .progressLabel=${this.stepLabel}
          .progressValue=${this.stepValue}
          .indicatorTypeOverride=${SequenceType.medium}
          .indicatorStyleOverride=${SequenceStyle.point}
        >
          <div class="sequence-modal-header-actions" slot="header-actions">
            <span class="sequence-modal-divider" aria-hidden="true"></span>
            <obc-icon-button
              class="close-button"
              variant="flat"
              aria-label=${this.closeLabel}
              @click=${this.onCloseClick}
            >
              <obi-close-google></obi-close-google>
            </obc-icon-button>
          </div>
          <slot name="actions" slot="actions"></slot>
          <slot></slot>
        </obc-sequence-card>
      </div>
    `;
  }
};
ObcSequenceModal.styles = unsafeCSS(componentStyle);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "type", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "stepLabel", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "stepValue", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "modalTitle", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "subtitle", 2);
__decorateClass([
  property({ type: Boolean })
], ObcSequenceModal.prototype, "hasTimeStamp", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "timeValue", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "timeLabel", 2);
__decorateClass([
  property({ type: Boolean })
], ObcSequenceModal.prototype, "hasActions", 2);
__decorateClass([
  property({ type: String })
], ObcSequenceModal.prototype, "closeLabel", 2);
ObcSequenceModal = __decorateClass([
  customElement("obc-sequence-modal")
], ObcSequenceModal);
export {
  ObcSequenceModal,
  ObcSequenceModalType
};
//# sourceMappingURL=sequence-modal.js.map
