{"version":3,"file":"TourBody.cjs","names":["factory","useProps","useTourContext","Box","classes"],"sources":["../../../../src/components/Tour/TourBody/TourBody.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport {\n  Box,\n  BoxProps,\n  CompoundStylesApiProps,\n  ElementProps,\n  factory,\n  Factory,\n  useProps,\n} from '../../../core';\nimport { useTourContext } from '../Tour.context';\nimport classes from '../Tour.module.css';\n\nexport type TourBodyStylesNames = 'body';\n\nexport interface TourBodyProps\n  extends BoxProps, CompoundStylesApiProps<TourBodyFactory>, ElementProps<'div'> {}\n\nexport type TourBodyFactory = Factory<{\n  props: TourBodyProps;\n  ref: HTMLDivElement;\n  stylesNames: TourBodyStylesNames;\n  compound: true;\n}>;\n\nconst defaultProps: Partial<TourBodyProps> = {};\n\nexport const TourBody = factory<TourBodyFactory>((_props) => {\n  const props = useProps('TourBody', defaultProps, _props);\n  const { children, classNames, className, style, styles, vars, id, ...others } = props;\n  const ctx = useTourContext();\n  const { registerBody } = ctx;\n  const resolvedId = id ?? ctx.bodyId;\n\n  useEffect(() => {\n    registerBody(resolvedId);\n    return () => registerBody(null);\n  }, [registerBody, resolvedId]);\n\n  return (\n    <Box\n      id={resolvedId}\n      {...ctx.getStyles('body', { className, classNames, style, styles })}\n      {...others}\n    >\n      {children}\n    </Box>\n  );\n});\n\nTourBody.classes = classes;\nTourBody.displayName = '@mantine/core/TourBody';\n\nexport namespace TourBody {\n  export type Props = TourBodyProps;\n}\n"],"mappings":";;;;;;;;;AAyBA,MAAM,eAAuC,CAAC;AAE9C,MAAa,WAAWA,gBAAAA,SAA0B,WAAW;CAE3D,MAAM,EAAE,UAAU,YAAY,WAAW,OAAO,QAAQ,MAAM,IAAI,GAAG,WADvDC,kBAAAA,SAAS,YAAY,cAAc,MACmC;CACpF,MAAM,MAAMC,qBAAAA,eAAe;CAC3B,MAAM,EAAE,iBAAiB;CACzB,MAAM,aAAa,MAAM,IAAI;CAE7B,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,aAAa,UAAU;EACvB,aAAa,aAAa,IAAI;CAChC,GAAG,CAAC,cAAc,UAAU,CAAC;CAE7B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,IAAI;EACJ,GAAI,IAAI,UAAU,QAAQ;GAAE;GAAW;GAAY;GAAO;EAAO,CAAC;EAClE,GAAI;EAEH;CACE,CAAA;AAET,CAAC;AAED,SAAS,UAAUC,oBAAAA;AACnB,SAAS,cAAc"}