var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import React, { forwardRef } from "react";
import { cl } from "../../../utils/helpers/index.js";
import { FileUploadDropzone, } from "../dropzone/FileUploadDropzone.js";
import { FileUploadItem, } from "../item/FileUploadItem.js";
import { FileUploadTrigger, } from "../trigger/FileUploadTrigger.js";
import { FileUploadLocaleContextProvider } from "./FileUploadRoot.context.js";
/**
 * A set of components used to upload and display files.
 * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/fileupload)
 * @example Dropzone
 * ```jsx
 *  <FileUpload.Dropzone />
 * ```
 *
 * @example
 * Items
 * ```jsx
 * <VStack gap="space-16" as="ul">
 *   <FileUpload.Item as="li" file={myFile} />
 *   <FileUpload.Item as="li" file={mySecondFile} />
 * </VStack>
 * ```
 */
export const FileUpload = forwardRef((_a, ref) => {
    var { children, className, translations } = _a, rest = __rest(_a, ["children", "className", "translations"]);
    return (React.createElement(FileUploadLocaleContextProvider, { translations: translations },
        React.createElement("div", Object.assign({ ref: ref }, rest, { className: cl("aksel-file-upload", className) }), children)));
});
FileUpload.Dropzone = FileUploadDropzone;
FileUpload.Item = FileUploadItem;
FileUpload.Trigger = FileUploadTrigger;
export default FileUpload;
export { FileUploadTrigger, FileUploadDropzone, FileUploadItem };
//# sourceMappingURL=FileUploadRoot.js.map