import "@emotion/react";
import "react";
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
import { UploadCellWrap } from "./UploadCellWrap.js";
import loadingSvg from "../../assets/icon/loading_black.svg.js";
import uploadSvg from "../../assets/icon/upload2.svg.js";
const UploadCell = ({
  label,
  loading,
  width,
  height,
  showTip = true,
  cssStyle,
  className,
  style,
  onClick
}) => {
  return /* @__PURE__ */ jsxs(
    UploadCellWrap,
    {
      width,
      height,
      css: cssStyle,
      className,
      style,
      children: [
        label && /* @__PURE__ */ jsx("div", { className: "label", children: label }),
        /* @__PURE__ */ jsxs("div", { className: "uploadCellContainer", children: [
          /* @__PURE__ */ jsx(
            "div",
            {
              onClick: () => {
                onClick == null ? void 0 : onClick();
              },
              children: loading ? /* @__PURE__ */ jsx("img", { src: loadingSvg }) : /* @__PURE__ */ jsx("img", { src: uploadSvg })
            }
          ),
          showTip && /* @__PURE__ */ jsx("div", { className: "tip", children: "upload your file" })
        ] })
      ]
    }
  );
};
export {
  UploadCell
};
//# sourceMappingURL=index.js.map
