{"version":3,"file":"Table.mjs","sources":["../../../../../../../../web/src/adminPortal/components/Table.tsx"],"sourcesContent":["import { SxProps, tableCellClasses, Theme } from '@mui/material';\nimport React from 'react';\n\nimport { TableCore, TableCoreProps } from '../shared/components/Table';\nimport { TableActions } from './TableActions';\nimport { Typography } from './Typography';\n\nexport type TableProps<T> = TableCoreProps<T>;\n\nconst tableCellSx: SxProps<Theme> = {\n  borderBottomColor: (theme) => theme.styleConfig.colors.subtle,\n  color: (theme) => theme.styleConfig.colors.primary,\n  backgroundColor: (theme) => theme.styleConfig.container.backgroundColor,\n};\n\nconst tableActionsCellSx = {\n  minWidth: 0,\n  [`&.${tableCellClasses.head}`]: {\n    textAlign: 'center',\n  },\n};\n\nconst tableRowSxWithoutBottomBorder = {\n  '&:last-child th, &:last-child td': {\n    borderBottom: 0,\n  },\n};\n\nconst expandMoreCellSx: SxProps<Theme> = {\n  padding: (theme) => theme.spacing(0.5, 0),\n  width: (theme) => theme.spacing(2),\n};\n\nconst expandedContentContainerSx: SxProps<Theme> = {\n  padding: (theme) => theme.spacing(1, 2, 1, 2),\n};\n\nexport const Table = <T extends object>(props: TableProps<T>): JSX.Element => {\n  return (\n    <TableCore\n      {...props}\n      TableActionsComponent={TableActions}\n      TypographyComponent={Typography}\n      tableCellSx={tableCellSx}\n      tableActionsCellSx={tableActionsCellSx}\n      tableRowSx={props.disableBottomBorder ? tableRowSxWithoutBottomBorder : undefined}\n      expandMoreCellSx={expandMoreCellSx}\n      expandedContentContainerSx={expandedContentContainerSx}\n    />\n  );\n};\n"],"names":["tableCellSx","borderBottomColor","theme","styleConfig","colors","subtle","color","primary","backgroundColor","container","tableActionsCellSx","minWidth","tableCellClasses","head","textAlign","tableRowSxWithoutBottomBorder","borderBottom","expandMoreCellSx","padding","spacing","width","expandedContentContainerSx","Table","props","React","TableCore","TableActionsComponent","TableActions","TypographyComponent","Typography","tableRowSx","disableBottomBorder","undefined"],"mappings":";;;;;;AASA,MAAMA,WAAAA,GAA8B;A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