import { TableProps } from '@mui/material'; import { IDataTable } from '../types/index'; /** * A functional component that renders additional column rows for a data table. * This component is generic and works with any type that extends `IDataTable.GenericRecord`. * * @template T - The type of the data record, extending `IDataTable.GenericRecord`. * * @param {Object} props - The props for the component. * @param {IDataTable.AdditionalColumn[]} props.data - An array of additional column definitions. * @param {T} props.item - The current data item being rendered. * * @returns {(React.JSX.Element | null)[]} An array of JSX elements or `null` for hidden columns. * * @remarks * - Each column is rendered as a `TableCell` with optional content based on the column type. * - Supported column types include: * - `"switch"`: Renders a small `Switch` component. * - `"deleteButton"`: Renders a small `IconButton` with a delete icon. * - Hidden columns (`hidden: true`) are skipped and return `null`. * * @example * ```tsx * const additionalColumns = [ * { label: "Active", width: 100, _key: "isActive", type: "switch", onClick: handleSwitch }, * { label: "Remove", width: 50, _key: "delete", type: "deleteButton", onClick: handleDelete }, * ]; * * const item = { isActive: true, delete: false }; * * ; * ``` */ declare const AdditionalColumnRows: ({ data, item, size, }: { data: IDataTable.AdditionalColumn[]; item: T; size?: TableProps["size"]; }) => (React.JSX.Element | null)[]; export default AdditionalColumnRows;