import { html } from "lit";
import { property } from "lit/decorators.js";
import { customElement } from "../../decorator.js";
import { ObcPoiButton } from "../building-blocks/poi-button/poi-button.js";
import { ObcPoiObjectType } from "../building-blocks/poi-object/poi-object.js";
import { ObcPoiObjectAtonType, ObcPoiObjectAtonStyle } from "../poi-object-aton/poi-object-aton.js";
import { ObcPoiObjectAtonState } from "../poi-object-aton/poi-object-aton.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 ObcPoiButtonAton = class extends ObcPoiButton {
  constructor() {
    super(...arguments);
    this.atonType = ObcPoiObjectAtonType.AtoN;
    this.atonStyle = ObcPoiObjectAtonStyle.Regular;
    this.atonState = null;
    this.atonInteractive = false;
  }
  /**
   * Maps the button's computed `poiObjectType` (Regular/Large) to the
   * aton type enum.  When the aton is in diamond mode (`AtoN`) the type
   * is fixed — otherwise it follows the button size.
   */
  get resolvedAtonType() {
    if (this.atonType === ObcPoiObjectAtonType.AtoN) {
      return ObcPoiObjectAtonType.AtoN;
    }
    switch (this.poiObjectType) {
      case ObcPoiObjectType.Large:
        return ObcPoiObjectAtonType.Large;
      default:
        return this.atonType;
    }
  }
  get wrapperVariantClasses() {
    return {
      "is-aton-diamond": this.resolvedAtonType === ObcPoiObjectAtonType.AtoN
    };
  }
  renderPoiObject() {
    return html`
      <obc-poi-object-aton
        class="poi-object"
        exportparts="background-frame"
        .type=${this.resolvedAtonType}
        .objectStyle=${this.atonStyle}
        .state=${this.atonState ?? this.poiObjectState}
        ?interactive=${this.atonInteractive}
      >
        <slot></slot>
      </obc-poi-object-aton>
    `;
  }
};
__decorateClass([
  property({ type: String, attribute: "aton-type" })
], ObcPoiButtonAton.prototype, "atonType", 2);
__decorateClass([
  property({ type: String, attribute: "aton-style" })
], ObcPoiButtonAton.prototype, "atonStyle", 2);
__decorateClass([
  property({ type: String, attribute: "aton-state" })
], ObcPoiButtonAton.prototype, "atonState", 2);
__decorateClass([
  property({ type: Boolean, attribute: "aton-interactive" })
], ObcPoiButtonAton.prototype, "atonInteractive", 2);
ObcPoiButtonAton = __decorateClass([
  customElement("obc-poi-button-aton")
], ObcPoiButtonAton);
export {
  ObcPoiButtonAton,
  ObcPoiObjectAtonState,
  ObcPoiObjectAtonStyle,
  ObcPoiObjectAtonType
};
//# sourceMappingURL=poi-button-aton.js.map
