"use client";
import { jsx as e, jsxs as b } from "react/jsx-runtime";
import { createContext as R, useContext as C } from "react";
import { S as N } from "./surface-dhshylwccuaz91d1.js";
import { c as D } from "./cn-ct4n7r74mh8y0f48.js";
import { ao as v, ap as A, aq as n, ar as c, as as g, at as d, au as p, av as m, aw as u } from "./vendor-base-ui-ccr5l0ynrievzzv3.js";
const P = {
  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 = R("dialog");
function s() {
  return C(f);
}
function h({
  size: a = r.size
} = {}) {
  return D(
    // Base styles
    "shadow-m 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
    P.size[a].classes
  );
}
function k({
  className: a,
  children: o,
  style: i,
  size: t = r.size
}) {
  const l = s();
  return /* @__PURE__ */ b(l === "alertdialog" ? p : p, { children: [
    /* @__PURE__ */ e(l === "alertdialog" ? m : m, { className: "fixed inset-0 bg-kumo-base opacity-80 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0" }),
    /* @__PURE__ */ e(
      N,
      {
        as: l === "alertdialog" ? u : u,
        className: D(h({ size: t }), 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 t = o === "alertdialog" ? v : A;
  return /* @__PURE__ */ e(f.Provider, { value: o, children: /* @__PURE__ */ e(t, { ...i, children: a }) });
}
x.displayName = "Dialog.Root";
function y({ children: a, ...o }) {
  const t = s() === "alertdialog" ? n : n;
  return /* @__PURE__ */ e(t, { ...o, children: a });
}
y.displayName = "Dialog.Trigger";
function w({ className: a, ...o }) {
  const t = s() === "alertdialog" ? c : c;
  return /* @__PURE__ */ e(t, { className: a, ...o });
}
w.displayName = "Dialog.Title";
function B({ className: a, ...o }) {
  const t = s() === "alertdialog" ? g : g;
  return /* @__PURE__ */ e(t, { className: a, ...o });
}
B.displayName = "Dialog.Description";
function T({ children: a, ...o }) {
  const t = s() === "alertdialog" ? d : d;
  return /* @__PURE__ */ e(t, { ...o, children: a });
}
T.displayName = "Dialog.Close";
const U = Object.assign(k, {
  Root: x,
  Trigger: y,
  Title: w,
  Description: B,
  Close: T
});
export {
  U as D,
  x as a,
  y as b,
  w as c,
  B as d,
  T as e
};
//# sourceMappingURL=dialog-l5tmwxrzp9g83jmw.js.map
