import FileDeleteButton from 'components/FileDeleteButton';

export const createDeleteFileColumn = (getOnDelete, options = {}) => ({
    field: 'delete',
    headerName: '',
    width: options.width ?? 48,
    sortable: false,
    filterable: false,
    disableColumnMenu: true,
    renderCell: (params) => (
        <FileDeleteButton
            onDelete={getOnDelete(params.id, params.row)}
            icon={options.icon}
            color={options.color}
        />
    ),
});
