import { jsx as g } from "@emotion/react/jsx-runtime";
import { forwardRef as p } from "react";
import { getPropDataTestId as c } from "../../../../test/getNameDataTestId.js";
import { DIALOG_KEY_COMPONENT as r } from "./constants.js";
import { getComponentSlotRoot as D } from "../../../../utils/getComponentSlotRoot.js";
import S from "clsx";
import { DialogRootStyled as C } from "./slots/DialogSlots.js";
import { DialogSlots as I } from "./slots/DialogEnum.js";
const w = p((t, l) => {
  const {
    variant: a,
    color: e,
    dataTestId: o,
    children: i,
    fullScreen: m,
    isCloseable: s,
    closeModal: d,
    ...n
  } = t, f = {
    dialogVariant: a,
    dialogColor: e,
    dialogDataTestId: o,
    dialogFullScreen: m
  };
  return /* @__PURE__ */ g(
    C,
    {
      className: S(D(r)),
      ...c(r, I.dialogRoot, o),
      ref: l,
      role: "dialog-role",
      ownerState: f,
      ...n,
      onClose: s ? d : void 0,
      children: i
    }
  );
});
export {
  w as Dialog
};
