{"version":3,"file":"isSlot.cjs","names":["SLOT_COMPONENT"],"sources":["../../../src/Slots/utils/isSlot.ts"],"sourcesContent":["import { isValidElement } from 'react';\nimport { SLOT_COMPONENT } from '../constants';\n\n/**\n * Checks whether a React element is a `Slot` component returned from `useSlots`.\n *\n * @param target - Value to inspect.\n * @returns `true` when the value is a Slot element.\n */\nexport function isSlot(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>)[SLOT_COMPONENT]\n    || (typeof type === 'function' && type.name === 'Slot')\n  );\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,OAAO,QAAsB;CAC3C,IAAI,EAAA,GAAA,MAAA,eAAA,CAAgB,MAAM,GAAG,OAAO;CAEpC,MAAM,OAAO,OAAO;CAEpB,OAAO,QACJ,KAAkCA,wBAAAA,mBAC/B,OAAO,SAAS,cAAc,KAAK,SAAS,MAClD;AACF"}