"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.ImportStepUpload = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _ImportStepUploadStCss = require("./ImportStepUpload.st.css.js");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/ImportButton/ImportStepUpload.tsx";
function _ImportStepUpload({
  state
}) {
  const {
    translate: t
  } = state;
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    direction: "vertical",
    gap: "SP2",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 15,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    height: "280px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 16,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.FileUpload, {
    dataHook: "import-file-input",
    className: (0, _ImportStepUploadStCss.st)(_ImportStepUploadStCss.classes.fileUpload),
    accept: ".csv,text/csv",
    onChange: files => {
      const file = files == null ? void 0 : files[0];
      if (file) {
        state.onFileSelected(file);
      }
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 17,
      columnNumber: 9
    }
  }, ({
    openFileUploadDialog
  }) => /*#__PURE__*/_react.default.createElement(_designSystem.AddItem, {
    size: "large",
    skin: "filled",
    onClick: openFileUploadDialog,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 29,
      columnNumber: 13
    }
  }, t('cairo.import.uploadButtonLabel')))));
}
const ImportStepUpload = exports.ImportStepUpload = (0, _mobxReactLite.observer)(_ImportStepUpload);
//# sourceMappingURL=ImportStepUpload.js.map