import { jsx as c } from "@emotion/react/jsx-runtime";
import f from "react";
import l from "clsx";
import { RootStyled as N } from "./slots/DistanceToNowFormatterSlots.js";
import { getPropDataTestId as T } from "../../../test/getNameDataTestId.js";
import { COMPONET_KEY_COMPONENT as r } from "./constants.js";
import { DistanceToNowFormatterSlots as d } from "./slots/slots.js";
import { useDistanceToNowFormatter as u } from "./hooks/useDistanceToNowFormatter.js";
import { getComponentSlotRoot as C } from "../../../utils/getComponentSlotRoot.js";
function S(e) {
  const { presentationTime: m = "present", date: n, dataTestId: a, delay: i, className: s, Component: o = N, componentProps: p } = e, { time: t } = u({ presentationTime: m, date: n, delay: i });
  return o === f.Fragment ? t : /* @__PURE__ */ c(
    o,
    {
      className: l(C(r), s),
      ...T(r, d.root, a),
      ...p,
      children: t
    }
  );
}
export {
  S as DistanceToNowFormatter
};
