{"version":3,"file":"ContentSelector.cjs","names":["isEnabled","createElement"],"sources":["../../../src/editor/ContentSelector.tsx"],"sourcesContent":["'use client';\n\nimport type { NodeProps } from '@intlayer/core/interpreter';\nimport { isEnabled } from '@intlayer/editor/isEnabled';\nimport { createElement, type FC, type HTMLAttributes } from 'react';\n\nexport type ContentSelectorProps = NodeProps &\n  Omit<HTMLAttributes<HTMLDivElement>, 'children'>;\n\nexport const ContentSelector: FC<ContentSelectorProps> = ({\n  children,\n  dictionaryKey,\n  keyPath,\n}) => {\n  if (process.env.INTLAYER_EDITOR_ENABLED === 'false' || !isEnabled) {\n    return children;\n  }\n\n  return createElement(\n    'intlayer-content-selector-wrapper',\n    {\n      'key-path': JSON.stringify(keyPath),\n      'dictionary-key': dictionaryKey,\n    },\n    children\n  );\n};\n"],"mappings":";;;;;;;AASA,MAAa,mBAA6C,EACxD,UACA,eACA,cACI;CACJ,IAAI,QAAQ,IAAI,4BAA4B,WAAW,CAACA,sCACtD,OAAO;CAGT,WAAOC,qBACL,qCACA;EACE,YAAY,KAAK,UAAU,OAAO;EAClC,kBAAkB;CACpB,GACA,QACF;AACF"}