{"version":3,"file":"is-command-registered.cjs","sources":["../src/is-command-registered.ts"],"sourcesContent":["import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport type { LexicalCommand } from \"lexical\";\n\n/**\n * Checks if a command is registered in the current Lexical editor.\n */\nexport function useIsCommandRegistered(command: LexicalCommand<unknown>) {\n  const [editor] = useLexicalComposerContext();\n\n  return editor._commands.has(command);\n}\n"],"names":["useLexicalComposerContext"],"mappings":";;;;AAMO,SAAS,uBAAuB,OAAkC,EAAA;AACvE,EAAM,MAAA,CAAC,MAAM,CAAA,GAAIA,gDAA0B,EAAA,CAAA;AAE3C,EAAO,OAAA,MAAA,CAAO,SAAU,CAAA,GAAA,CAAI,OAAO,CAAA,CAAA;AACrC;;;;"}