"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.MultiLevelSortingTableListItem = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _mobxReactLite = require("mobx-react-lite");
var _MultiLevelSortingColumnSelect = require("./MultiLevelSortingColumnSelect");
var _MultiLevelSortingOrderSelect = require("./MultiLevelSortingOrderSelect");
var _react2 = require("@wix/bex-core/react");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/MultiLevelSortingPanel/MultiLevelSortingTableListItem.tsx";
function _MultiLevelSortingTableListItem(props) {
  const {
    sortableColumn,
    state,
    domRef,
    dragging,
    draggable,
    index,
    showDivider,
    dragHandleProps,
    droppable,
    ...rest
  } = props;
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
    ref: domRef,
    "data-hook": `multi-level-sorting-item-${sortableColumn.columnId}`
  }, rest, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38,
      columnNumber: 5
    }
  }), /*#__PURE__*/_react.default.createElement(_designSystem.TableListItem, {
    verticalPadding: "tiny",
    draggable: draggable,
    dragging: dragging,
    showDivider: showDivider,
    options: [{
      value: /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
        width: "100%",
        direction: "horizontal",
        verticalAlign: "middle",
        gap: "SP2",
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 51,
          columnNumber: 15
        }
      }, /*#__PURE__*/_react.default.createElement(_MultiLevelSortingColumnSelect.MultiLevelSortingColumnSelect, {
        sortableColumn: sortableColumn,
        state: state,
        index: index,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 57,
          columnNumber: 17
        }
      }), /*#__PURE__*/_react.default.createElement(_MultiLevelSortingOrderSelect.MultiLevelSortingOrderSelect, {
        sortableColumn: sortableColumn,
        state: state,
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 62,
          columnNumber: 17
        }
      }), /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
        content: t('cairo.table.advanced-sorting.remove.button.tooltip'),
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 66,
          columnNumber: 17
        }
      }, /*#__PURE__*/_react.default.createElement(_designSystem.IconButton, {
        dataHook: "multi-level-sorting-remove-sort",
        size: "small",
        skin: "light",
        onClick: () => {
          state.removeSort(sortableColumn.columnId);
        },
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 71,
          columnNumber: 19
        }
      }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.DeleteSmall, {
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 79,
          columnNumber: 21
        }
      }))))
    }],
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 43,
      columnNumber: 7
    }
  }));
}
const MultiLevelSortingTableListItem = exports.MultiLevelSortingTableListItem = (0, _mobxReactLite.observer)(_MultiLevelSortingTableListItem);
//# sourceMappingURL=MultiLevelSortingTableListItem.js.map