"use client";
const require_factory = require("../factory.cjs");
const require_use_file_upload_context = require("./use-file-upload-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-preview.tsx
var FileUploadItemPreview = (0, react.forwardRef)((props, ref) => {
	const fileUpload = require_use_file_upload_context.useFileUploadContext();
	const itemProps = require_use_file_upload_item_props_context.useFileUploadItemPropsContext();
	const mergedProps = (0, _zag_js_react.mergeProps)(fileUpload.getItemPreviewProps(itemProps), props);
	if (!itemProps.file.type.match(props.type ?? ".*")) return null;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.div, {
		...mergedProps,
		ref
	});
});
FileUploadItemPreview.displayName = "FileUploadItemPreview";
//#endregion
exports.FileUploadItemPreview = FileUploadItemPreview;
