"use client";
import { jsx as t, jsxs as b } from "react/jsx-runtime";
import { createContext as v, useContext as N } from "react";
import { L as P } from "./layer-card-hvivdirwwnyq88wa.js";
import { c as D } from "./cn-ct4n7r74mh8y0f48.js";
import { u as A } from "./portal-provider-hwmkdmkpvct0cb76.js";
import { ap as k, aq as h, ar as n, as as c, at as g, au as d, av as p, aw as m, ax as u } from "./vendor-base-ui-ie71jahf0czyf58j.js";
const L = {
  size: {
    base: {
      classes: "sm:min-w-96",
      description: "Default dialog width"
    },
    sm: {
      classes: "min-w-72",
      description: "Small dialog for simple confirmations"
    },
    lg: {
      classes: "min-w-[32rem]",
      description: "Large dialog for complex content"
    },
    xl: {
      classes: "min-w-[48rem]",
      description: "Extra large dialog for detailed views"
    }
  }
}, r = {
  size: "base",
  role: "dialog"
}, f = v("dialog");
function s() {
  return N(f);
}
function z({
  size: a = r.size
} = {}) {
  return D(
    // Base styles
    "shadow-m ring ring-kumo-line fixed top-1/2 left-1/2 w-full sm:w-auto max-w-[calc(100vw-2rem)] sm:max-w-[calc(100vw-3rem)] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-xl bg-kumo-base text-kumo-default duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0",
    // Apply size from KUMO_DIALOG_VARIANTS
    L.size[a].classes
  );
}
function O({
  className: a,
  children: o,
  style: i,
  size: e = r.size,
  container: C
}) {
  const l = s(), R = A();
  return /* @__PURE__ */ b(l === "alertdialog" ? p : p, { container: C ?? R ?? void 0, children: [
    /* @__PURE__ */ t(l === "alertdialog" ? m : m, { className: "fixed inset-0 bg-kumo-recessed opacity-80 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0" }),
    /* @__PURE__ */ t(
      P,
      {
        render: /* @__PURE__ */ t(l === "alertdialog" ? u : u, {}),
        className: D(z({ size: e }), a),
        style: {
          transitionProperty: "scale, opacity",
          transitionTimingFunction: "var(--default-transition-timing-function)",
          "--tw-shadow": "0 20px 25px -5px rgb(0 0 0 / 0.03), 0 8px 10px -6px rgb(0 0 0 / 0.03)",
          ...i
        },
        children: o
      }
    )
  ] });
}
function x({
  children: a,
  role: o = r.role,
  ...i
}) {
  const e = o === "alertdialog" ? k : h;
  return /* @__PURE__ */ t(f.Provider, { value: o, children: /* @__PURE__ */ t(e, { ...i, children: a }) });
}
x.displayName = "Dialog.Root";
function y({ children: a, ...o }) {
  const e = s() === "alertdialog" ? n : n;
  return /* @__PURE__ */ t(e, { ...o, children: a });
}
y.displayName = "Dialog.Trigger";
function w({ className: a, ...o }) {
  const e = s() === "alertdialog" ? c : c;
  return /* @__PURE__ */ t(e, { className: a, ...o });
}
w.displayName = "Dialog.Title";
function B({ className: a, ...o }) {
  const e = s() === "alertdialog" ? g : g;
  return /* @__PURE__ */ t(e, { className: a, ...o });
}
B.displayName = "Dialog.Description";
function T({ children: a, ...o }) {
  const e = s() === "alertdialog" ? d : d;
  return /* @__PURE__ */ t(e, { ...o, children: a });
}
T.displayName = "Dialog.Close";
const K = Object.assign(O, {
  Root: x,
  Trigger: y,
  Title: w,
  Description: B,
  Close: T
});
export {
  K as D,
  x as a,
  y as b,
  w as c,
  B as d,
  T as e
};
//# sourceMappingURL=dialog-94v7wiz7j3in6528.js.map
