{"version":3,"file":"isTemplate.cjs","names":["TEMPLATE_COMPONENT"],"sources":["../../../src/Slots/utils/isTemplate.ts"],"sourcesContent":["import { isValidElement } from 'react';\nimport { TEMPLATE_COMPONENT } from '../constants';\n\n/**\n * Checks whether a React element is a `Template` marker.\n *\n * @param target - Value to inspect.\n * @returns `true` when the value is a Template element.\n */\nexport function isTemplate(target: any): boolean {\n  if (!isValidElement(target)) return false;\n\n  const type = target.type as Record<PropertyKey, any> | Function;\n\n  return Boolean(\n    (type as Record<PropertyKey, any>)[TEMPLATE_COMPONENT]\n    || (typeof type === 'function' && type.name === 'Template')\n  );\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,WAAW,QAAsB;CAC/C,IAAI,EAAA,GAAA,MAAA,eAAA,CAAgB,MAAM,GAAG,OAAO;CAEpC,MAAM,OAAO,OAAO;CAEpB,OAAO,QACJ,KAAkCA,wBAAAA,uBAC/B,OAAO,SAAS,cAAc,KAAK,SAAS,UAClD;AACF"}