import { jsx as n } from "@emotion/react/jsx-runtime";
import { getPropDataTestId as l } from "../../../../test/getNameDataTestId.js";
import { POPOVER_PREFIX as m, POPOVER_CLASS_NAME_SPECIFY as P } from "./constants.js";
import c from "clsx";
import { PopoverRootStyled as f } from "./slots/PopoverSlots.js";
import { PopoverSlots as h } from "./slots/PopoverEnum.js";
const x = (r) => {
  const {
    children: t,
    className: e,
    size: v,
    instaceDataTestId: i,
    anchorOrigin: a = { vertical: "bottom", horizontal: "right" },
    transformOrigin: p = { vertical: "top", horizontal: "right" },
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    arrowType: d = "no-arrow",
    open: o = !1,
    ...s
  } = r;
  return o ? (
    /* PopoverRoot: Contenedor principal del componente, es usado para aplicar los estilos css de los
        overrides que provienen del objeto del tema. Se usa para garantizar de que estos estilos no se
        propaguen a otros componentes de la plataforna web. */
    /* @__PURE__ */ n(
      f,
      {
        open: o,
        className: c(e, P),
        "data-testid": "PopoverRoot",
        anchorOrigin: a,
        transformOrigin: p,
        transitionDuration: 0,
        TransitionProps: {
          timeout: 0
        },
        ...l(m, h.root, i),
        slotProps: {
          paper: {
            "aria-label": "Paper-popover-root",
            sx: {
              p: 1,
              overflow: "inherit"
            }
          }
        },
        ...s,
        children: t
      }
    )
  ) : null;
};
export {
  x as Popover
};
