{"version":3,"file":"ListItemAdditionalInfo.mjs","sources":["../../../src/listItem/AdditionalInfo/ListItemAdditionalInfo.tsx"],"sourcesContent":["import { PropsWithChildren, useContext } from 'react';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport Body from '../../body';\nimport Link, { type LinkProps } from '../../link';\nimport { Typography } from '../../common';\n\nexport type ListItemAdditionalInfoProps = PropsWithChildren<{\n  /**\n   * Props object to be passed to the [Link](https://storybook.wise.design/?path=/docs/typography-link--docs) component.\n   */\n  action?: { label: string } & Pick<LinkProps, 'href' | 'onClick' | 'target'>;\n}>;\n\nexport const AdditionalInfo = function ({ children, action }: ListItemAdditionalInfoProps) {\n  const { ids } = useContext<ListItemContextData>(ListItemContext);\n\n  return (\n    <Body\n      type={Typography.BODY_DEFAULT}\n      id={ids.additionalInfo}\n      className=\"wds-list-item-additional-info\"\n    >\n      {children}\n      {action ? (\n        <>\n          {' '}\n          <Link href={action.href} target={action.target} onClick={action.onClick}>\n            {action.label}\n          </Link>\n        </>\n      ) : null}\n    </Body>\n  );\n};\n\nAdditionalInfo.displayName = 'ListItem.AdditionalInfo';\n"],"names":["AdditionalInfo","children","action","ids","useContext","ListItemContext","_jsxs","Body","type","Typography","BODY_DEFAULT","id","additionalInfo","className","_Fragment","_jsx","Link","href","target","onClick","label","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaO,MAAMA,cAAc,GAAG,UAAU;EAAEC,QAAQ;AAAEC,EAAAA;AAAM,CAA+B,EAAA;EACvF,MAAM;AAAEC,IAAAA;AAAG,GAAE,GAAGC,UAAU,CAAsBC,eAAe,CAAC;EAEhE,oBACEC,IAAA,CAACC,IAAI,EAAA;IACHC,IAAI,EAAEC,UAAU,CAACC,YAAa;IAC9BC,EAAE,EAAER,GAAG,CAACS,cAAe;AACvBC,IAAAA,SAAS,EAAC,+BAA+B;AAAAZ,IAAAA,QAAA,GAExCA,QAAQ,EACRC,MAAM,gBACLI,IAAA,CAAAQ,QAAA,EAAA;AAAAb,MAAAA,QAAA,EAAA,CACG,GAAG,eACJc,GAAA,CAACC,IAAI,EAAA;QAACC,IAAI,EAAEf,MAAM,CAACe,IAAK;QAACC,MAAM,EAAEhB,MAAM,CAACgB,MAAO;QAACC,OAAO,EAAEjB,MAAM,CAACiB,OAAQ;QAAAlB,QAAA,EACrEC,MAAM,CAACkB;AAAK,OACT,CACR;KAAA,CAAG,GACD,IAAI;AAAA,GACJ,CAAC;AAEX;AAEApB,cAAc,CAACqB,WAAW,GAAG,yBAAyB;;;;"}