import { a as TailwindElement, x } from '../../index-2f5488b6.js';
import { n, e } from '../../query-assigned-elements-5d94572f.js';
import { c as customClassMap } from '../../index-5e194caf.js';
import '../../directive-2bb7789e.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 LuksoModal = class extends TailwindElement {
  constructor() {
    super(...arguments);
    this.isOpen = false;
    this.size = "small";
    this.wrapperStyles = `opacity-0 fixed z-[1000] transition-opacity top-0 left-0 p-6 animate-fade-in animation-duration-200`;
    this.openStyles = `flex opacity-100 visible items-center justify-center w-[100vw] h-[100vh]`;
    this.overlayStyles = `bg-[rgba(36,53,66,0.8)] backdrop-blur-sm fixed top-0 left-0 w-[100vw] h-[100vh] z-[999]`;
    this.dialogStyles = `bg-neutral-98 rounded-12 shadow-neutral-drop-shadow-3xl z-[1001]`;
  }
  close() {
    this.isOpen = false;
  }
  render() {
    return x`
      <div
        data-testid="modal"
        class=${customClassMap({
      [this.wrapperStyles]: true,
      [this.openStyles]: this.isOpen,
      ["invisible"]: !this.isOpen
    })}
      >
        <div
          class=${customClassMap({
      [this.overlayStyles]: true
    })}
        ></div>
        <div
          class=${customClassMap({
      [this.dialogStyles]: true,
      ["w-[352px]"]: this.size === "small",
      ["w-[849px]"]: this.size === "medium",
      ["w-full"]: this.size === "full"
    })}
        >
          <slot></slot>
        </div>
      </div>
    `;
  }
};
__decorateClass([
  n({ type: Boolean, attribute: "is-open" })
], LuksoModal.prototype, "isOpen", 2);
__decorateClass([
  n({ type: String })
], LuksoModal.prototype, "size", 2);
LuksoModal = __decorateClass([
  e("lukso-modal")
], LuksoModal);

export { LuksoModal };
