import { useCallback as o } from "react";
function e(n) {
  const t = o(
    (r) => {
      if (!n) return;
      const { color: l } = r;
      n.chain().setMark("textColor", { color: l }).run();
    },
    [n]
  ), a = o(
    (r) => {
      if (!n) return;
      const { color: l } = r;
      n.chain().setMark("bgColor", { color: l }).run();
    },
    [n]
  ), c = o(() => {
    n && n.chain().unsetMark("textColor").run();
  }, [n]), s = o(() => {
    n && n.chain().unsetMark("bgColor").run();
  }, [n]);
  return { handleTextColor: t, handleBgColor: a, handleResetTextColor: c, handleResetBgColor: s };
}
export {
  e as default
};
//# sourceMappingURL=useHtmlEditorColorAction.js.map
