import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import Link from '../Link';
import NoValue from '../NoValue/NoValue';
import FileItem from './FileItem';
const FileDisplay = forwardRef(function FileDisplay({ id, displayText, value, variant, thumbnail, onPreview, onDownload, compact = false, ...restProps }, ref) {
    if (variant === 'text' || !value) {
        return (_jsx("span", { ref: ref, ...restProps, children: value ? displayText || value : _jsx(NoValue, {}) }));
    }
    if (variant === 'link')
        return (_jsx(Link, { ref: ref, ...restProps, href: value, children: displayText || value }));
    return (_jsx(FileItem, { ...restProps, id: id, ref: ref, format: value.split('.').pop() ?? value, name: displayText || value, thumbnail: thumbnail, onDownload: onDownload, onPreview: onPreview, compact: compact }));
});
export default FileDisplay;
//# sourceMappingURL=FileDisplay.js.map