import { useCallback } from 'react';
import { getSanitizedName } from '../../utilities/entities/entityUtilities';
export const TableColumnDefs = (actionList) => {
    const getterRowData = useCallback((params) => {
        return params.data;
    }, []);
    const columnDefs = [
        {
            headerName: 'Name',
            field: 'entityName',
            valueGetter: (params) => {
                var _a, _b, _c, _d;
                return ((_b = (_a = params.data) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.displayName) ||
                    ((_c = params.data) === null || _c === void 0 ? void 0 : _c.sanitizedName) ||
                    getSanitizedName((_d = params.data) === null || _d === void 0 ? void 0 : _d.entityName);
            },
            wrapText: true,
            autoHeight: false,
            sortable: false
        },
        {
            headerName: 'Actions',
            filter: false,
            pinned: 'right',
            cellRenderer: 'actionsRenderer',
            // minWidth: 50,
            width: 150,
            cellRendererParams: {
                actionList: actionList
            },
            valueGetter: getterRowData,
            maxWidth: 180,
            suppressMenu: true,
            sortable: false,
            cellStyle: { display: 'flex', alignItems: 'center' }
        }
    ];
    return columnDefs;
};
export const defaultColumnActionsDef = {
    resizable: true,
    editable: false,
    sortable: true,
    filter: true,
    floatingFilter: false,
    enableRowGroup: true
};
//# sourceMappingURL=TableColumnDefs.js.map