import { jsx as _jsx } from "react/jsx-runtime";
import {} from "react";
import { twMerge } from "tailwind-merge";
import { UploadFileList } from "../upload-file-list/upload-file-list.js";
import { mapUploadsToFileItems } from "./utils.js";
export function UploadFileListContainer(props) {
    const { uploadsArray, uploadsCount, removeUpload, clearAllUploads, setSelectedNode, onClose, onConflictResolution, className, ...delegatedProps } = props;
    // Don't render if there are no uploads
    if (uploadsCount === 0)
        return null;
    const items = mapUploadsToFileItems(uploadsArray, removeUpload, setSelectedNode, onConflictResolution);
    const handleClose = onClose ?? clearAllUploads;
    return (_jsx("div", { className: twMerge("fixed bottom-4 right-4 z-[1001]", className), ...delegatedProps, children: _jsx(UploadFileList, { items: items, onClose: handleClose }) }));
}
//# sourceMappingURL=upload-file-list-container.js.map