import React, { useMemo } from 'react';
import { TableContainer } from '../../maintenanceEngine/tableBrowser/TableContainer';
export const SampleFileImportGrid = (props) => {
    const { sampleData, mappings } = props;
    const actionList = useMemo(() => [], []);
    const columnDefs = useMemo(() => {
        if (mappings) {
            const fieldMappings = JSON.parse(mappings === null || mappings === void 0 ? void 0 : mappings.mapping);
            return fieldMappings === null || fieldMappings === void 0 ? void 0 : fieldMappings.map((mapping) => {
                return {
                    headerName: mapping.udpField,
                    field: mapping.importFileField,
                    maxWidth: 180
                };
            });
        }
        return [];
    }, [mappings]);
    return (sampleData &&
        mappings && (React.createElement(TableContainer, { title: "Sample Data Import", data: sampleData, isServerSide: false, actionList: actionList, customColumnDefs: columnDefs, hideSearchBar: true, disablePagination: true, hiddenActionButtons: [
            'saveView',
            'views',
            'insights',
            'importExport',
            'group',
            'filter',
            'columns',
            'clearFilters',
        ], height: '105px' })));
};
//# sourceMappingURL=SampleFileImportGrid.js.map