import { jsx as o } from "react/jsx-runtime";
import { useEmojiDropdownMenuState as n } from "@udecode/plate-emoji";
import { EmojiToolbarDropdown as p } from "./EmojiToolbarDropdown.es.js";
import { useEmojiSelect as c } from "./useEmojiSelect.es.js";
import { ToolbarButton as s } from "../../components/Toolbar/ToolbarButton.es.js";
import l from "../../../../foundation/Icon/Generated/IconFaceHappy16.es.js";
import { ButtonWrapper as j, IconStylingWrapper as a } from "../helper.es.js";
import { EmojiPicker as f } from "./EmojiPicker/EmojiPicker.es.js";
const I = ({ id: e }) => {
  const { isOpen: r, setIsOpen: t, emojiPickerState: m } = n(), { selectEmojiFromDropdown: i } = c();
  return /* @__PURE__ */ o(j, { id: e, children: /* @__PURE__ */ o(
    p,
    {
      isOpen: r,
      setIsOpen: t,
      control: /* @__PURE__ */ o(s, { pressed: r, children: /* @__PURE__ */ o(a, { icon: /* @__PURE__ */ o(l, {}) }) }),
      children: /* @__PURE__ */ o(
        f,
        {
          isOpen: r,
          setIsOpen: t,
          ...m,
          onSelectEmoji: i
        }
      )
    }
  ) });
};
export {
  I as EmojiButton
};
//# sourceMappingURL=EmojiButton.es.js.map
