import * as u from "react";
let n = 0;
function o(t) {
  const [e, a] = u.useState(t), l = t || e;
  return u.useEffect(() => {
    e == null && (n += 1, a(`mui-${n}`));
  }, [e]), l;
}
const s = u.useId;
function f(t) {
  if (s !== void 0) {
    const e = s();
    return t ?? e;
  }
  return o(t);
}
export {
  f as default
};
