"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.TableGridSwitchButton = void 0;
var _mobxReactLite = require("mobx-react-lite");
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _react2 = require("@wix/bex-core/react");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/TableGridSwitchButton/TableGridSwitchButton.tsx";
function _TableGridSwitchButton(props) {
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  const {
    state
  } = props;
  const {
    viewType
  } = state;
  return /*#__PURE__*/_react.default.createElement(_designSystem.SegmentedToggle, {
    size: "small",
    dataHook: "table-grid-switch-toggle-button",
    selected: viewType,
    onClick: (_, value) => {
      if (state.viewType === value) {
        return;
      }
      state.changeViewType(value);
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 20,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.SegmentedToggle.Icon, {
    value: "grid",
    dataHook: "toggle-option-grid",
    tooltipText: t('cairo.table.gridView'),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.LayoutGallery, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 36,
      columnNumber: 9
    }
  })), /*#__PURE__*/_react.default.createElement(_designSystem.SegmentedToggle.Icon, {
    value: "table",
    dataHook: "toggle-option-table",
    tooltipText: t('cairo.table.listView'),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.LayoutList, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 43,
      columnNumber: 9
    }
  })));
}
const TableGridSwitchButton = exports.TableGridSwitchButton = (0, _mobxReactLite.observer)(_TableGridSwitchButton);
//# sourceMappingURL=TableGridSwitchButton.js.map