{"version":3,"file":"component.cjs","names":["useCardBody","Scrollable","View","contextConnect"],"sources":["../../../src/card/card-body/component.tsx"],"sourcesContent":["import type { ForwardedRef } from 'react';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { Scrollable } from '../../scrollable';\nimport { View } from '../../view';\nimport { useCardBody } from './hook';\nimport type { BodyProps } from '../types';\n\nfunction UnconnectedCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { isScrollable, ...otherProps } = useCardBody( props );\n\n\tif ( isScrollable ) {\n\t\treturn <Scrollable { ...otherProps } ref={ forwardedRef } />;\n\t}\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardBody` renders an optional content area for a `Card`.\n * Multiple `CardBody` components can be used within `Card` if needed.\n *\n * ```jsx\n * import { Card, CardBody } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>\n * \t\t...\n * \t</CardBody>\n * </Card>\n * ```\n */\nexport const CardBody = contextConnect( UnconnectedCardBody, 'CardBody' );\n\nexport default CardBody;\n"],"mappings":";;;;;;;;;;;AAQA,SAAS,oBACR,OACA,cACC;CACD,MAAM,EAAE,cAAc,GAAG,gBAAA,GAAeA,UAAAA,YAAAA,CAAa,KAAM;CAE3D,IAAK,cACJ,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,YAAD;EAAY,GAAK;EAAa,KAAM;CAAgB,CAAA;CAG5D,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,MAAD;EAAM,GAAK;EAAa,KAAM;CAAgB,CAAA;AACtD;;;;;;;;;;;;;;;AAgBA,MAAa,YAAA,GAAWC,uBAAAA,eAAAA,CAAgB,qBAAqB,UAAW"}