"use client";
import * as c from "react";
import * as f from "react-dom";
import { createSlot as p } from "../node_modules/@radix-ui/react-slot/dist/index.js";
import { jsx as l } from "react/jsx-runtime";
var u = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
], h = u.reduce((t, i) => {
  const e = p(`Primitive.${i}`), r = c.forwardRef((o, s) => {
    const { asChild: m, ...a } = o, n = m ? e : i;
    return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: s });
  });
  return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
}, {});
function w(t, i) {
  t && f.flushSync(() => t.dispatchEvent(i));
}
export {
  h as Primitive,
  w as dispatchDiscreteCustomEvent
};
