"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.deleteSecondaryAction = deleteSecondaryAction;
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _react = _interopRequireDefault(require("react"));
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/deleteSecondaryAction/deleteSecondaryAction.tsx";
function deleteSecondaryAction(props) {
  const {
    optimisticActions,
    actionCellAPI: {
      openConfirmDeleteModal,
      collection,
      keyedItem
    },
    ...deleteManyParams
  } = props;
  const {
    translate: t
  } = collection;
  return {
    dataHook: 'collection-delete-action',
    text: t('cairo.delete.button'),
    icon: /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.Delete, {
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 39,
        columnNumber: 11
      }
    }),
    onClick: () => {
      openConfirmDeleteModal({
        primaryButtonOnClick: () => {
          optimisticActions.deleteOne(keyedItem.item, deleteManyParams);
        }
      });
    }
  };
}
//# sourceMappingURL=deleteSecondaryAction.js.map