"use client";
import { jsx as i, jsxs as s } from "react/jsx-runtime";
import { INSERT_CHECK_LIST_COMMAND as m } from "../../../../../node_modules/@lexical/list/LexicalList.prod.js";
import { $setBlocksType as n } from "../../../../../node_modules/@lexical/selection/LexicalSelection.prod.js";
import { $getSelection as l, $isRangeSelection as p, $createParagraphNode as f } from "../../../../../node_modules/lexical/Lexical.prod.js";
import { useToolbarContext as h } from "../../../context/toolbar-context.js";
import { blockTypeToBlockName as r } from "./block-format-data.js";
import { SelectItem as d } from "../../../../ui/select.js";
const o = "check";
function x() {
  const { activeEditor: e, blockType: c } = h(), a = () => {
    e.update(() => {
      const t = l();
      p(t) && n(t, () => f());
    });
  };
  return /* @__PURE__ */ i(d, { value: o, onPointerDown: () => {
    c !== "check" ? e.dispatchCommand(m, void 0) : a();
  }, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-1 font-normal", children: [
    r[o].icon,
    r[o].label
  ] }) });
}
export {
  x as FormatCheckList
};
