import * as i from "react";
import { jsx as a } from "react/jsx-runtime";
const s = /* @__PURE__ */ i.forwardRef(function(r, n) {
  const {
    cutout: e,
    ...p
  } = r;
  let o;
  if (e) {
    const t = e == null ? void 0 : e.getBoundingClientRect();
    o = `polygon(
      0% 0%,
      100% 0%,
      100% 100%,
      0% 100%,
      0% 0%,
      ${t.left}px ${t.top}px,
      ${t.left}px ${t.bottom}px,
      ${t.right}px ${t.bottom}px,
      ${t.right}px ${t.top}px,
      ${t.left}px ${t.top}px
    )`;
  }
  return /* @__PURE__ */ a("div", {
    ref: n,
    role: "presentation",
    "data-base-ui-inert": "",
    ...p,
    style: {
      position: "fixed",
      inset: 0,
      userSelect: "none",
      WebkitUserSelect: "none",
      clipPath: o
    }
  });
});
process.env.NODE_ENV !== "production" && (s.displayName = "InternalBackdrop");
export {
  s as InternalBackdrop
};
