import { createVNode, defineComponent, mergeProps, ref } from "vue";
import { Upload } from "antdv-next";
//#region components/attachments/SilentUploader.tsx
/**
* SilentUploader only wraps children with Upload.
*/
var SilentUploader = /* @__PURE__ */ defineComponent({
	name: "XSilentUploader",
	inheritAttrs: false,
	props: {
		upload: {
			type: Object,
			default: () => ({})
		},
		visible: {
			type: Boolean,
			default: void 0
		},
		class: {
			type: [
				String,
				Array,
				Object
			],
			default: void 0
		},
		style: {
			type: [
				String,
				Object,
				Array
			],
			default: void 0
		}
	},
	setup(props, { attrs, slots }) {
		const uploadRef = ref();
		return () => createVNode(Upload, mergeProps(props.upload, attrs, {
			"showUploadList": false,
			"class": [props.class, attrs.class],
			"style": [
				props.style,
				props.visible === false ? { display: "none" } : null,
				attrs.style
			],
			"ref": uploadRef
		}), { default: () => [slots.default?.()] });
	}
});
//#endregion
export { SilentUploader as default };
