"use client";
import * as s from "react";
import { S as f } from "./safeReact-DKq-628G.js";
let a = 0;
function l(t, e = "mui") {
  const [u, o] = s.useState(t), c = t || u;
  return s.useEffect(() => {
    u == null && (a += 1, o(`${e}-${a}`));
  }, [u, e]), c;
}
const n = f.useId;
function d(t, e) {
  if (n !== void 0) {
    const u = n();
    return t ?? (e ? `${e}-${u}` : u);
  }
  return l(t, e);
}
function r(t) {
  return d(t, "base-ui");
}
export {
  d as a,
  r as u
};
