var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React from 'react';
import { DataTypes } from '@reltio/mdm-sdk';
import { BlobRenderer } from '../BlobRenderer';
import { DataTypeValue } from '../DataTypeValue';
import { ExpandedValueTooltip } from '../ExpandedValueTooltip';
import classnames from 'classnames';
import { useStyles } from './styles';
export var DefaultCellValueRenderer = function (props) {
    var styles = useStyles();
    var value = props.value, _a = props.columnData, dataTypeDefinition = _a.dataTypeDefinition, columnClassName = _a.className, className = props.className;
    switch (dataTypeDefinition.type) {
        case DataTypes.TYPE_BLOB:
            return React.createElement(BlobRenderer, __assign({}, props, { className: columnClassName }));
        default: {
            var dataTypeValue = React.createElement(DataTypeValue, { value: value, dataTypeDefinition: dataTypeDefinition });
            return (React.createElement(ExpandedValueTooltip, { value: dataTypeValue },
                React.createElement("div", { "data-reltio-id": "default-renderer", className: classnames(styles.defaultWrapper, className, columnClassName) }, dataTypeValue)));
        }
    }
};
