import { deepEqual as m } from "fast-equals";
import { useState as u, useRef as n, useEffect as f, useMemo as c } from "react";
import { ColumnIconFormatter as s } from "./formatter.js";
import { ColumnIconGroupFormatter as a } from "./ColumnIconGroupFormatter.js";
const P = (e) => {
  const [t, o] = u(e), r = n({ ...e });
  return f(() => {
    m(r.current, e) || (r.current = e, o(e));
  }, [e]), c(() => ({
    formatter: s(t),
    renderGroupCell: a(t)
  }), [t]);
};
export {
  P as useColumnIcon
};
