import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
import { useIsDragAndDropEnabled, useOnDropFile, useSelectedDriveId, } from "@powerhousedao/reactor-browser";
import { DropZone } from "./drop-zone.js";
export function DropZoneWrapper({ children, ...props }) {
    const isDragAndDropEnabled = useIsDragAndDropEnabled();
    const selectedDriveId = useSelectedDriveId();
    const onDropFile = useOnDropFile();
    const onAddFile = async (file, parent, onProgress, resolveConflict) => {
        return await onDropFile(file, onProgress, resolveConflict);
    };
    if (!isDragAndDropEnabled || !selectedDriveId) {
        return _jsx(_Fragment, { children: children });
    }
    return (_jsx(DropZone, { onAddFile: onAddFile, driveId: selectedDriveId, useLocalStorage: true, ...props, children: children }));
}
//# sourceMappingURL=drop-zone-wrapper.js.map