import * as r from "react";
import { c as ot, P as L, u as K, b as C, k as at, g as st, j as ct, y as Y } from "./index.D1n9HtNk.js";
import { c as ut, d as Se, h as it, I as lt, u as dt, R as ft, F as mt, e as pt, f as ht, V as vt, S as ve, T as Ce, C as Ct } from "./icons.fQeDMwI8.js";
import { c as Re, f as ne, e as gt, a as Pe, A as Mt, P as H, b as _t, D as St, C as Rt, u as ge, d as Pt } from "./theme.BwnlJUJD.js";
import { jsx as u } from "react/jsx-runtime";
import { r as Et, c as Ee, R as b, b as yt, l as ye, g as Me, o as bt, a as W } from "./radius.prop.CaJVv35S.js";
var te = ["Enter", " "], wt = ["ArrowDown", "PageUp", "Home"], be = ["ArrowUp", "PageDown", "End"], It = [...wt, ...be], xt = {
  ltr: [...te, "ArrowRight"],
  rtl: [...te, "ArrowLeft"]
}, Nt = {
  ltr: ["ArrowLeft"],
  rtl: ["ArrowRight"]
}, G = "Menu", [k, Tt, At] = ut(G), [I, mn] = ot(G, [
  At,
  Re,
  Se
]), V = Re(), we = Se(), [Ie, P] = I(G), [Ot, U] = I(G), xe = (e) => {
  const { __scopeMenu: n, open: t = !1, children: o, dir: s, onOpenChange: a, modal: l = !0 } = e, f = V(n), [m, p] = r.useState(null), d = r.useRef(!1), c = ne(a), h = gt(s);
  return r.useEffect(() => {
    const g = () => {
      d.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
    }, v = () => d.current = !1;
    return document.addEventListener("keydown", g, { capture: !0 }), () => {
      document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
    };
  }, []), /* @__PURE__ */ u(Pe, { ...f, children: /* @__PURE__ */ u(
    Ie,
    {
      scope: n,
      open: t,
      onOpenChange: c,
      content: m,
      onContentChange: p,
      children: /* @__PURE__ */ u(
        Ot,
        {
          scope: n,
          onClose: r.useCallback(() => c(!1), [c]),
          isUsingKeyboardRef: d,
          dir: h,
          modal: l,
          children: o
        }
      )
    }
  ) });
};
xe.displayName = G;
var Dt = "MenuAnchor", re = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, ...o } = e, s = V(t);
    return /* @__PURE__ */ u(Mt, { ...s, ...o, ref: n });
  }
);
re.displayName = Dt;
var oe = "MenuPortal", [kt, Ne] = I(oe, {
  forceMount: void 0
}), Te = (e) => {
  const { __scopeMenu: n, forceMount: t, children: o, container: s } = e, a = P(oe, n);
  return /* @__PURE__ */ u(kt, { scope: n, forceMount: t, children: /* @__PURE__ */ u(H, { present: t || a.open, children: /* @__PURE__ */ u(_t, { asChild: !0, container: s, children: o }) }) });
};
Te.displayName = oe;
var _ = "MenuContent", [Ft, ae] = I(_), Ae = r.forwardRef(
  (e, n) => {
    const t = Ne(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, a = P(_, e.__scopeMenu), l = U(_, e.__scopeMenu);
    return /* @__PURE__ */ u(k.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(H, { present: o || a.open, children: /* @__PURE__ */ u(k.Slot, { scope: e.__scopeMenu, children: l.modal ? /* @__PURE__ */ u(Lt, { ...s, ref: n }) : /* @__PURE__ */ u(Kt, { ...s, ref: n }) }) }) });
  }
), Lt = r.forwardRef(
  (e, n) => {
    const t = P(_, e.__scopeMenu), o = r.useRef(null), s = K(n, o);
    return r.useEffect(() => {
      const a = o.current;
      if (a) return it(a);
    }, []), /* @__PURE__ */ u(
      se,
      {
        ...e,
        ref: s,
        trapFocus: t.open,
        disableOutsidePointerEvents: t.open,
        disableOutsideScroll: !0,
        onFocusOutside: C(
          e.onFocusOutside,
          (a) => a.preventDefault(),
          { checkForDefaultPrevented: !1 }
        ),
        onDismiss: () => t.onOpenChange(!1)
      }
    );
  }
), Kt = r.forwardRef((e, n) => {
  const t = P(_, e.__scopeMenu);
  return /* @__PURE__ */ u(
    se,
    {
      ...e,
      ref: n,
      trapFocus: !1,
      disableOutsidePointerEvents: !1,
      disableOutsideScroll: !1,
      onDismiss: () => t.onOpenChange(!1)
    }
  );
}), Gt = st("MenuContent.ScrollLock"), se = r.forwardRef(
  (e, n) => {
    const {
      __scopeMenu: t,
      loop: o = !1,
      trapFocus: s,
      onOpenAutoFocus: a,
      onCloseAutoFocus: l,
      disableOutsidePointerEvents: f,
      onEntryFocus: m,
      onEscapeKeyDown: p,
      onPointerDownOutside: d,
      onFocusOutside: c,
      onInteractOutside: h,
      onDismiss: g,
      disableOutsideScroll: v,
      ...S
    } = e, E = P(_, t), R = U(_, t), Ze = V(t), qe = we(t), de = Tt(t), [Je, fe] = r.useState(null), $ = r.useRef(null), Qe = K(n, $, E.onContentChange), z = r.useRef(0), B = r.useRef(""), et = r.useRef(0), q = r.useRef(null), me = r.useRef("right"), J = r.useRef(0), tt = v ? ft : r.Fragment, nt = v ? { as: Gt, allowPinchZoom: !0 } : void 0, rt = (i) => {
      const N = B.current + i, y = de().filter((M) => !M.disabled), T = document.activeElement, Q = y.find((M) => M.ref.current === T)?.textValue, ee = y.map((M) => M.textValue), pe = qt(ee, N, Q), A = y.find((M) => M.textValue === pe)?.ref.current;
      (function M(he) {
        B.current = he, window.clearTimeout(z.current), he !== "" && (z.current = window.setTimeout(() => M(""), 1e3));
      })(N), A && setTimeout(() => A.focus());
    };
    r.useEffect(() => () => window.clearTimeout(z.current), []), dt();
    const x = r.useCallback((i) => me.current === q.current?.side && Qt(i, q.current?.area), []);
    return /* @__PURE__ */ u(
      Ft,
      {
        scope: t,
        searchRef: B,
        onItemEnter: r.useCallback(
          (i) => {
            x(i) && i.preventDefault();
          },
          [x]
        ),
        onItemLeave: r.useCallback(
          (i) => {
            x(i) || ($.current?.focus(), fe(null));
          },
          [x]
        ),
        onTriggerLeave: r.useCallback(
          (i) => {
            x(i) && i.preventDefault();
          },
          [x]
        ),
        pointerGraceTimerRef: et,
        onPointerGraceIntentChange: r.useCallback((i) => {
          q.current = i;
        }, []),
        children: /* @__PURE__ */ u(tt, { ...nt, children: /* @__PURE__ */ u(
          mt,
          {
            asChild: !0,
            trapped: s,
            onMountAutoFocus: C(a, (i) => {
              i.preventDefault(), $.current?.focus({ preventScroll: !0 });
            }),
            onUnmountAutoFocus: l,
            children: /* @__PURE__ */ u(
              St,
              {
                asChild: !0,
                disableOutsidePointerEvents: f,
                onEscapeKeyDown: p,
                onPointerDownOutside: d,
                onFocusOutside: c,
                onInteractOutside: h,
                onDismiss: g,
                children: /* @__PURE__ */ u(
                  pt,
                  {
                    asChild: !0,
                    ...qe,
                    dir: R.dir,
                    orientation: "vertical",
                    loop: o,
                    currentTabStopId: Je,
                    onCurrentTabStopIdChange: fe,
                    onEntryFocus: C(m, (i) => {
                      R.isUsingKeyboardRef.current || i.preventDefault();
                    }),
                    preventScrollOnEntryFocus: !0,
                    children: /* @__PURE__ */ u(
                      Rt,
                      {
                        role: "menu",
                        "aria-orientation": "vertical",
                        "data-state": We(E.open),
                        "data-radix-menu-content": "",
                        dir: R.dir,
                        ...Ze,
                        ...S,
                        ref: Qe,
                        style: { outline: "none", ...S.style },
                        onKeyDown: C(S.onKeyDown, (i) => {
                          const y = i.target.closest("[data-radix-menu-content]") === i.currentTarget, T = i.ctrlKey || i.altKey || i.metaKey, Q = i.key.length === 1;
                          y && (i.key === "Tab" && i.preventDefault(), !T && Q && rt(i.key));
                          const ee = $.current;
                          if (i.target !== ee || !It.includes(i.key)) return;
                          i.preventDefault();
                          const A = de().filter((M) => !M.disabled).map((M) => M.ref.current);
                          be.includes(i.key) && A.reverse(), Wt(A);
                        }),
                        onBlur: C(e.onBlur, (i) => {
                          i.currentTarget.contains(i.target) || (window.clearTimeout(z.current), B.current = "");
                        }),
                        onPointerMove: C(
                          e.onPointerMove,
                          F((i) => {
                            const N = i.target, y = J.current !== i.clientX;
                            if (i.currentTarget.contains(N) && y) {
                              const T = i.clientX > J.current ? "right" : "left";
                              me.current = T, J.current = i.clientX;
                            }
                          })
                        )
                      }
                    )
                  }
                )
              }
            )
          }
        ) })
      }
    );
  }
);
Ae.displayName = _;
var Vt = "MenuGroup", ce = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, ...o } = e;
    return /* @__PURE__ */ u(L.div, { role: "group", ...o, ref: n });
  }
);
ce.displayName = Vt;
var Ut = "MenuLabel", Oe = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, ...o } = e;
    return /* @__PURE__ */ u(L.div, { ...o, ref: n });
  }
);
Oe.displayName = Ut;
var j = "MenuItem", _e = "menu.itemSelect", Z = r.forwardRef(
  (e, n) => {
    const { disabled: t = !1, onSelect: o, ...s } = e, a = r.useRef(null), l = U(j, e.__scopeMenu), f = ae(j, e.__scopeMenu), m = K(n, a), p = r.useRef(!1), d = () => {
      const c = a.current;
      if (!t && c) {
        const h = new CustomEvent(_e, { bubbles: !0, cancelable: !0 });
        c.addEventListener(_e, (g) => o?.(g), { once: !0 }), at(c, h), h.defaultPrevented ? p.current = !1 : l.onClose();
      }
    };
    return /* @__PURE__ */ u(
      De,
      {
        ...s,
        ref: m,
        disabled: t,
        onClick: C(e.onClick, d),
        onPointerDown: (c) => {
          e.onPointerDown?.(c), p.current = !0;
        },
        onPointerUp: C(e.onPointerUp, (c) => {
          p.current || c.currentTarget?.click();
        }),
        onKeyDown: C(e.onKeyDown, (c) => {
          const h = f.searchRef.current !== "";
          t || h && c.key === " " || te.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
        })
      }
    );
  }
);
Z.displayName = j;
var De = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, disabled: o = !1, textValue: s, ...a } = e, l = ae(j, t), f = we(t), m = r.useRef(null), p = K(n, m), [d, c] = r.useState(!1), [h, g] = r.useState("");
    return r.useEffect(() => {
      const v = m.current;
      v && g((v.textContent ?? "").trim());
    }, [a.children]), /* @__PURE__ */ u(
      k.ItemSlot,
      {
        scope: t,
        disabled: o,
        textValue: s ?? h,
        children: /* @__PURE__ */ u(lt, { asChild: !0, ...f, focusable: !o, children: /* @__PURE__ */ u(
          L.div,
          {
            role: "menuitem",
            "data-highlighted": d ? "" : void 0,
            "aria-disabled": o || void 0,
            "data-disabled": o ? "" : void 0,
            ...a,
            ref: p,
            onPointerMove: C(
              e.onPointerMove,
              F((v) => {
                o ? l.onItemLeave(v) : (l.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
              })
            ),
            onPointerLeave: C(
              e.onPointerLeave,
              F((v) => l.onItemLeave(v))
            ),
            onFocus: C(e.onFocus, () => c(!0)),
            onBlur: C(e.onBlur, () => c(!1))
          }
        ) })
      }
    );
  }
), $t = "MenuCheckboxItem", ke = r.forwardRef(
  (e, n) => {
    const { checked: t = !1, onCheckedChange: o, ...s } = e;
    return /* @__PURE__ */ u(Ve, { scope: e.__scopeMenu, checked: t, children: /* @__PURE__ */ u(
      Z,
      {
        role: "menuitemcheckbox",
        "aria-checked": X(t) ? "mixed" : t,
        ...s,
        ref: n,
        "data-state": le(t),
        onSelect: C(
          s.onSelect,
          () => o?.(X(t) ? !0 : !t),
          { checkForDefaultPrevented: !1 }
        )
      }
    ) });
  }
);
ke.displayName = $t;
var Fe = "MenuRadioGroup", [zt, Bt] = I(
  Fe,
  { value: void 0, onValueChange: () => {
  } }
), Le = r.forwardRef(
  (e, n) => {
    const { value: t, onValueChange: o, ...s } = e, a = ne(o);
    return /* @__PURE__ */ u(zt, { scope: e.__scopeMenu, value: t, onValueChange: a, children: /* @__PURE__ */ u(ce, { ...s, ref: n }) });
  }
);
Le.displayName = Fe;
var Ke = "MenuRadioItem", Ge = r.forwardRef(
  (e, n) => {
    const { value: t, ...o } = e, s = Bt(Ke, e.__scopeMenu), a = t === s.value;
    return /* @__PURE__ */ u(Ve, { scope: e.__scopeMenu, checked: a, children: /* @__PURE__ */ u(
      Z,
      {
        role: "menuitemradio",
        "aria-checked": a,
        ...o,
        ref: n,
        "data-state": le(a),
        onSelect: C(
          o.onSelect,
          () => s.onValueChange?.(t),
          { checkForDefaultPrevented: !1 }
        )
      }
    ) });
  }
);
Ge.displayName = Ke;
var ue = "MenuItemIndicator", [Ve, Yt] = I(
  ue,
  { checked: !1 }
), Ue = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, forceMount: o, ...s } = e, a = Yt(ue, t);
    return /* @__PURE__ */ u(
      H,
      {
        present: o || X(a.checked) || a.checked === !0,
        children: /* @__PURE__ */ u(
          L.span,
          {
            ...s,
            ref: n,
            "data-state": le(a.checked)
          }
        )
      }
    );
  }
);
Ue.displayName = ue;
var jt = "MenuSeparator", $e = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, ...o } = e;
    return /* @__PURE__ */ u(
      L.div,
      {
        role: "separator",
        "aria-orientation": "horizontal",
        ...o,
        ref: n
      }
    );
  }
);
$e.displayName = jt;
var Xt = "MenuArrow", ze = r.forwardRef(
  (e, n) => {
    const { __scopeMenu: t, ...o } = e, s = V(t);
    return /* @__PURE__ */ u(Pt, { ...s, ...o, ref: n });
  }
);
ze.displayName = Xt;
var ie = "MenuSub", [Ht, Be] = I(ie), Ye = (e) => {
  const { __scopeMenu: n, children: t, open: o = !1, onOpenChange: s } = e, a = P(ie, n), l = V(n), [f, m] = r.useState(null), [p, d] = r.useState(null), c = ne(s);
  return r.useEffect(() => (a.open === !1 && c(!1), () => c(!1)), [a.open, c]), /* @__PURE__ */ u(Pe, { ...l, children: /* @__PURE__ */ u(
    Ie,
    {
      scope: n,
      open: o,
      onOpenChange: c,
      content: p,
      onContentChange: d,
      children: /* @__PURE__ */ u(
        Ht,
        {
          scope: n,
          contentId: ge(),
          triggerId: ge(),
          trigger: f,
          onTriggerChange: m,
          children: t
        }
      )
    }
  ) });
};
Ye.displayName = ie;
var D = "MenuSubTrigger", je = r.forwardRef(
  (e, n) => {
    const t = P(D, e.__scopeMenu), o = U(D, e.__scopeMenu), s = Be(D, e.__scopeMenu), a = ae(D, e.__scopeMenu), l = r.useRef(null), { pointerGraceTimerRef: f, onPointerGraceIntentChange: m } = a, p = { __scopeMenu: e.__scopeMenu }, d = r.useCallback(() => {
      l.current && window.clearTimeout(l.current), l.current = null;
    }, []);
    return r.useEffect(() => d, [d]), r.useEffect(() => {
      const c = f.current;
      return () => {
        window.clearTimeout(c), m(null);
      };
    }, [f, m]), /* @__PURE__ */ u(re, { asChild: !0, ...p, children: /* @__PURE__ */ u(
      De,
      {
        id: s.triggerId,
        "aria-haspopup": "menu",
        "aria-expanded": t.open,
        "aria-controls": s.contentId,
        "data-state": We(t.open),
        ...e,
        ref: ct(n, s.onTriggerChange),
        onClick: (c) => {
          e.onClick?.(c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), t.open || t.onOpenChange(!0));
        },
        onPointerMove: C(
          e.onPointerMove,
          F((c) => {
            a.onItemEnter(c), !c.defaultPrevented && !e.disabled && !t.open && !l.current && (a.onPointerGraceIntentChange(null), l.current = window.setTimeout(() => {
              t.onOpenChange(!0), d();
            }, 100));
          })
        ),
        onPointerLeave: C(
          e.onPointerLeave,
          F((c) => {
            d();
            const h = t.content?.getBoundingClientRect();
            if (h) {
              const g = t.content?.dataset.side, v = g === "right", S = v ? -5 : 5, E = h[v ? "left" : "right"], R = h[v ? "right" : "left"];
              a.onPointerGraceIntentChange({
                area: [
                  // Apply a bleed on clientX to ensure that our exit point is
                  // consistently within polygon bounds
                  { x: c.clientX + S, y: c.clientY },
                  { x: E, y: h.top },
                  { x: R, y: h.top },
                  { x: R, y: h.bottom },
                  { x: E, y: h.bottom }
                ],
                side: g
              }), window.clearTimeout(f.current), f.current = window.setTimeout(
                () => a.onPointerGraceIntentChange(null),
                300
              );
            } else {
              if (a.onTriggerLeave(c), c.defaultPrevented) return;
              a.onPointerGraceIntentChange(null);
            }
          })
        ),
        onKeyDown: C(e.onKeyDown, (c) => {
          const h = a.searchRef.current !== "";
          e.disabled || h && c.key === " " || xt[o.dir].includes(c.key) && (t.onOpenChange(!0), t.content?.focus(), c.preventDefault());
        })
      }
    ) });
  }
);
je.displayName = D;
var Xe = "MenuSubContent", He = r.forwardRef(
  (e, n) => {
    const t = Ne(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, a = P(_, e.__scopeMenu), l = U(_, e.__scopeMenu), f = Be(Xe, e.__scopeMenu), m = r.useRef(null), p = K(n, m);
    return /* @__PURE__ */ u(k.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(H, { present: o || a.open, children: /* @__PURE__ */ u(k.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(
      se,
      {
        id: f.contentId,
        "aria-labelledby": f.triggerId,
        ...s,
        ref: p,
        align: "start",
        side: l.dir === "rtl" ? "left" : "right",
        disableOutsidePointerEvents: !1,
        disableOutsideScroll: !1,
        trapFocus: !1,
        onOpenAutoFocus: (d) => {
          l.isUsingKeyboardRef.current && m.current?.focus(), d.preventDefault();
        },
        onCloseAutoFocus: (d) => d.preventDefault(),
        onFocusOutside: C(e.onFocusOutside, (d) => {
          d.target !== f.trigger && a.onOpenChange(!1);
        }),
        onEscapeKeyDown: C(e.onEscapeKeyDown, (d) => {
          l.onClose(), d.preventDefault();
        }),
        onKeyDown: C(e.onKeyDown, (d) => {
          const c = d.currentTarget.contains(d.target), h = Nt[l.dir].includes(d.key);
          c && h && (a.onOpenChange(!1), f.trigger?.focus(), d.preventDefault());
        })
      }
    ) }) }) });
  }
);
He.displayName = Xe;
function We(e) {
  return e ? "open" : "closed";
}
function X(e) {
  return e === "indeterminate";
}
function le(e) {
  return X(e) ? "indeterminate" : e ? "checked" : "unchecked";
}
function Wt(e) {
  const n = document.activeElement;
  for (const t of e)
    if (t === n || (t.focus(), document.activeElement !== n)) return;
}
function Zt(e, n) {
  return e.map((t, o) => e[(n + o) % e.length]);
}
function qt(e, n, t) {
  const s = n.length > 1 && Array.from(n).every((p) => p === n[0]) ? n[0] : n, a = t ? e.indexOf(t) : -1;
  let l = Zt(e, Math.max(a, 0));
  s.length === 1 && (l = l.filter((p) => p !== t));
  const m = l.find(
    (p) => p.toLowerCase().startsWith(s.toLowerCase())
  );
  return m !== t ? m : void 0;
}
function Jt(e, n) {
  const { x: t, y: o } = e;
  let s = !1;
  for (let a = 0, l = n.length - 1; a < n.length; l = a++) {
    const f = n[a], m = n[l], p = f.x, d = f.y, c = m.x, h = m.y;
    d > o != h > o && t < (c - p) * (o - d) / (h - d) + p && (s = !s);
  }
  return s;
}
function Qt(e, n) {
  if (!n) return !1;
  const t = { x: e.clientX, y: e.clientY };
  return Jt(t, n);
}
function F(e) {
  return (n) => n.pointerType === "mouse" ? e(n) : void 0;
}
var pn = xe, hn = re, vn = Te, Cn = Ae, gn = ce, Mn = Oe, _n = Z, Sn = ke, Rn = Le, Pn = Ge, En = Ue, yn = $e, bn = ze, wn = Ye, In = je, xn = He;
function en(e, n) {
  const { asChild: t, children: o } = e;
  if (!t) return typeof n == "function" ? n(o) : n;
  const s = r.Children.only(o);
  return r.cloneElement(s, { children: typeof n == "function" ? n(s.props.children) : n });
}
const tn = ["1", "2", "3"], O = { ...Ee, size: { values: tn, default: "1" }, ...Et, scrollbars: { default: "both" } };
function nn(e) {
  const { m: n, mx: t, my: o, mt: s, mr: a, mb: l, ml: f, ...m } = e;
  return { m: n, mx: t, my: o, mt: s, mr: a, mb: l, ml: f, rest: m };
}
const w = yt.m.values;
function rn(e) {
  const [n, t] = b({ className: "rt-r-m", customProperties: ["--margin"], propValues: w, value: e.m }), [o, s] = b({ className: "rt-r-mx", customProperties: ["--margin-left", "--margin-right"], propValues: w, value: e.mx }), [a, l] = b({ className: "rt-r-my", customProperties: ["--margin-top", "--margin-bottom"], propValues: w, value: e.my }), [f, m] = b({ className: "rt-r-mt", customProperties: ["--margin-top"], propValues: w, value: e.mt }), [p, d] = b({ className: "rt-r-mr", customProperties: ["--margin-right"], propValues: w, value: e.mr }), [c, h] = b({ className: "rt-r-mb", customProperties: ["--margin-bottom"], propValues: w, value: e.mb }), [g, v] = b({ className: "rt-r-ml", customProperties: ["--margin-left"], propValues: w, value: e.ml });
  return [Y(n, o, a, f, p, c, g), ye(t, s, l, m, d, h, v)];
}
const on = r.forwardRef((e, n) => {
  const { rest: t, ...o } = nn(e), [s, a] = rn(o), { asChild: l, children: f, className: m, style: p, type: d, scrollHideDelay: c = d !== "scroll" ? 0 : void 0, dir: h, size: g = O.size.default, radius: v = O.radius.default, scrollbars: S = O.scrollbars.default, ...E } = t;
  return r.createElement(ht, { type: d, scrollHideDelay: c, className: Y("rt-ScrollAreaRoot", s, m), style: ye(a, p), asChild: l }, en({ asChild: l, children: f }, (R) => r.createElement(r.Fragment, null, r.createElement(vt, { ...E, ref: n, className: "rt-ScrollAreaViewport" }, R), r.createElement("div", { className: "rt-ScrollAreaViewportFocusRing" }), S !== "vertical" ? r.createElement(ve, { "data-radius": v, orientation: "horizontal", className: Y("rt-ScrollAreaScrollbar", Me({ className: "rt-r-size", value: g, propValues: O.size.values })) }, r.createElement(Ce, { className: "rt-ScrollAreaThumb" })) : null, S !== "horizontal" ? r.createElement(ve, { "data-radius": v, orientation: "vertical", className: Y("rt-ScrollAreaScrollbar", Me({ className: "rt-r-size", value: g, propValues: O.size.values })) }, r.createElement(Ce, { className: "rt-ScrollAreaThumb" })) : null, S === "both" ? r.createElement(Ct, { className: "rt-ScrollAreaCorner" }) : null)));
});
on.displayName = "ScrollArea";
const an = ["1", "2"], sn = ["solid", "soft"], Nn = { size: { type: "enum", className: "rt-r-size", values: an, default: "2", responsive: !0 }, variant: { type: "enum", className: "rt-variant", values: sn, default: "solid" }, ...W, ...bt }, Tn = { ...Ee, ...W }, An = { ...W }, On = { ...W };
export {
  hn as A,
  Cn as C,
  gn as G,
  _n as I,
  Mn as L,
  vn as P,
  pn as R,
  yn as S,
  Sn as a,
  En as b,
  mn as c,
  Rn as d,
  Pn as e,
  bn as f,
  In as g,
  xn as h,
  on as i,
  Tn as j,
  An as k,
  wn as l,
  Nn as n,
  On as p
};
