import { useMemo as i } from "react";
import { renderTag as a } from "./helpers/renderTag.js";
import { renderMultipleTags as m } from "./helpers/renderMultipleTag.js";
import { useComponentSize as u } from "../../../hooks/useComponentSize/index.js";
const c = (o) => {
  const { tags: r, className: t, size: s } = o, { currentSize: n } = u(s), e = i(() => r ? Array.isArray(r) ? r : [r] : null, [r]);
  return !e || e.length === 0 ? null : e.length === 1 ? a({
    tag: e[0],
    size: n,
    className: t
  }) : m(e, n, t);
};
export {
  c as TagsFormatter
};
