import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { forwardRef } from "react";
import { twMerge } from "tailwind-merge";
import { UploadFileItemErrorDetails } from "./components/error-details.js";
import { UploadFileItemHeader } from "./components/header.js";
import { UploadFileItemProgressBar } from "./components/progress-bar.js";
import { UploadFileItemStatusRow } from "./components/status-row.js";
export const UploadFileItem = forwardRef(function UploadFileItem(props, ref) {
    const { fileName, fileSize, status, documentType, progress = 0, errorDetails, onClose, onOpenDocument, onFindResolution, className, ...delegatedProps } = props;
    return (_jsxs("div", { ref: ref, className: twMerge("flex w-full flex-col gap-0.5 rounded-md border border-gray-100 bg-white p-2 shadow-[0_2px_12px_rgba(37,42,52,0.1)]", className), ...delegatedProps, children: [_jsx(UploadFileItemHeader, { fileName: fileName, fileSize: fileSize, documentType: documentType, onClose: onClose }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx(UploadFileItemStatusRow, { status: status, progress: progress, onOpenDocument: onOpenDocument, onFindResolution: onFindResolution }), _jsx(UploadFileItemProgressBar, { status: status, progress: progress }), _jsx(UploadFileItemErrorDetails, { status: status, errorDetails: errorDetails })] })] }));
});
//# sourceMappingURL=upload-file-item.js.map