import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import React, { useEffect } from "react";
import { Button, Upload } from "antd";
import { InboxOutlined, UploadOutlined } from "@ant-design/icons";
import classNames from "classnames";
import "./index.less";
//#region src/components/pisellUpload/index.tsx
const { Dragger } = Upload;
const PisellUpload = (props) => {
	const { title, text1, text2, uploadType } = props;
	useEffect(() => {
		document.body.id = "body";
	}, []);
	if (uploadType === "custom") return /* @__PURE__ */ React.createElement(Upload, props, props.children);
	return /* @__PURE__ */ React.createElement("div", null, uploadType === "button" ? /* @__PURE__ */ React.createElement(Upload, props, /* @__PURE__ */ React.createElement(Button, { icon: /* @__PURE__ */ React.createElement(UploadOutlined, null) }, "Upload")) : /* @__PURE__ */ React.createElement(Dragger, _objectSpread2(_objectSpread2({}, props), {}, { className: classNames("pisell-upload-wapper") }), /* @__PURE__ */ React.createElement("p", { className: "ant-upload-drag-icon" }, /* @__PURE__ */ React.createElement(InboxOutlined, null)), /* @__PURE__ */ React.createElement("p", { className: "ant-upload-title" }, title), /* @__PURE__ */ React.createElement("p", { className: "ant-upload-text1" }, text1), /* @__PURE__ */ React.createElement("p", { className: "ant-upload-text2" }, text2)));
};
//#endregion
export { PisellUpload as default };
