"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_factory = require("../factory.cjs");
const require_use_file_upload_context = require("./use-file-upload-context.cjs");
const require_use_file_upload_item_group_props_context = require("./use-file-upload-item-group-props-context.cjs");
const require_use_file_upload_item_props_context = require("./use-file-upload-item-props-context.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/file-upload/file-upload-item.tsx
var splitItemBaseProps = require_create_split_props.createSplitProps();
var FileUploadItem = (0, react.forwardRef)((props, ref) => {
	const [itemProps, localProps] = splitItemBaseProps(props, ["file"]);
	const fileUpload = require_use_file_upload_context.useFileUploadContext();
	const itemGroupProps = require_use_file_upload_item_group_props_context.useFileUploadItemGroupPropsContext();
	const itemPropsWithType = {
		...itemProps,
		type: itemGroupProps.type
	};
	const mergedProps = (0, _zag_js_react.mergeProps)(fileUpload.getItemProps(itemPropsWithType), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_file_upload_item_props_context.FileUploadItemPropsProvider, {
		value: itemPropsWithType,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.li, {
			...mergedProps,
			ref
		})
	});
});
FileUploadItem.displayName = "FileUploadItem";
//#endregion
exports.FileUploadItem = FileUploadItem;
