import { useTranslation } from 'react-i18next';
import { UploadCellWrap } from "./UploadCellWrap";
import uploadSvg from "../../../styles/assets/icon/upload2.svg";
import loadingSvg from "../../../styles/assets/icon/loading_black.svg";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
const UploadCell = ({
  label,
  loading,
  width,
  height,
  showTip: _showTip = true,
  onClick
}) => {
  const {
    t
  } = useTranslation();
  return /*#__PURE__*/_jsxs(UploadCellWrap, {
    width: width,
    height: height,
    children: [label && /*#__PURE__*/_jsx("div", {
      className: "label",
      children: t(label)
    }), /*#__PURE__*/_jsxs("div", {
      className: "uploadCellContainer",
      children: [/*#__PURE__*/_jsx("div", {
        onClick: () => {
          onClick === null || onClick === void 0 ? void 0 : onClick();
        },
        children: loading ? /*#__PURE__*/_jsx("img", {
          src: loadingSvg
        }) : /*#__PURE__*/_jsx("img", {
          src: uploadSvg
        })
      }), _showTip && /*#__PURE__*/_jsx("div", {
        className: "tip",
        children: t('upload your file')
      })]
    })]
  });
};
export default UploadCell;