"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.ExportStepConfig = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _ToolbarCollectionContext = require("../ToolbarCollectionContext");
var _RadioGroupSafe = require("./RadioGroupSafe");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/ExportButton/ExportStepConfig.tsx";
function _ExportStepConfig({
  state,
  exportToCSVMessage
}) {
  const {
    selectedExportOption,
    disabledRadios,
    totalForExportMap,
    translate: t
  } = state;
  const table = (0, _ToolbarCollectionContext.useToolbarCollectionContext)();
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    gap: "SP4",
    direction: "vertical",
    paddingBottom: "SP1",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 27,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_RadioGroupSafe.RadioGroupSafe, {
    dataHook: "export-group",
    onChange: val => state.onExportTypeChange(val),
    value: selectedExportOption,
    disabledRadios: disabledRadios,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 28,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.RadioGroup.Radio, {
    value: "all",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 36,
      columnNumber: 9
    }
  }, t('cairo.export.allItems')), /*#__PURE__*/_react.default.createElement(_designSystem.RadioGroup.Radio, {
    value: "filtered",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 39,
      columnNumber: 9
    }
  }, t('cairo.export.filteredItems'), ' ', disabledRadios.indexOf('filtered') === -1 ? totalForExportMap.filtered != null && `(${totalForExportMap.filtered})` : '(0)'), table.selectionProps.value.showSelection && /*#__PURE__*/_react.default.createElement(_designSystem.RadioGroup.Radio, {
    value: "selected",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 47,
      columnNumber: 11
    }
  }, t('cairo.export.selectedItems'), ' ', disabledRadios.indexOf('selected') === -1 ? totalForExportMap.selected != null && `(${totalForExportMap.selected})` : '(0)')), /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
    dataHook: "export-csv-message",
    widows: true,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 57,
      columnNumber: 7
    }
  }, exportToCSVMessage || t('cairo.export.exportToCSVMessage')));
}
const ExportStepConfig = exports.ExportStepConfig = (0, _mobxReactLite.observer)(_ExportStepConfig);
//# sourceMappingURL=ExportStepConfig.js.map