"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.TagsListItemView = void 0;
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/Tags/ManageTags/ManageTagsModal/List/TagListItemView.tsx";
const TagsListItemView = ({
  state,
  tag,
  isLastTag
}) => {
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  const handleEditClick = () => {
    state.handleEditCtaClick(tag);
  };
  const handleDeleteClick = () => {
    state.deleteTag(tag);
  };
  return /*#__PURE__*/_react.default.createElement(_designSystem.TableListItem, {
    dataHook: "manage-tags-modal-tag-row",
    options: [{
      value: /*#__PURE__*/_react.default.createElement(_designSystem.Tag, {
        id: tag.id,
        removable: false,
        ellipsisProps: {
          enterDelay: 500
        },
        dataHook: "manage-tags-modal-tag",
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 41,
          columnNumber: 13
        }
      }, tag.name),
      width: '1fr',
      align: 'left'
    }, {
      value: /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
        gap: "SP2",
        align: "right",
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 55,
          columnNumber: 13
        }
      }, /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
        content: t('cairo.tags.manageTags.modal.list.action.rename.CTA'),
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 56,
          columnNumber: 15
        }
      }, /*#__PURE__*/_react.default.createElement(_designSystem.IconButton, {
        dataHook: "manage-tags-modal-tag-action-edit",
        size: "small",
        priority: "secondary",
        onClick: handleEditClick,
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 61,
          columnNumber: 17
        }
      }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.EditSmall, {
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 67,
          columnNumber: 19
        }
      }))), /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
        content: t('cairo.tags.manageTags.modal.list.action.delete.CTA'),
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 70,
          columnNumber: 15
        }
      }, /*#__PURE__*/_react.default.createElement(_designSystem.IconButton, {
        dataHook: "manage-tags-modal-tag-action-delete",
        size: "small",
        priority: "secondary",
        onClick: handleDeleteClick,
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 75,
          columnNumber: 17
        }
      }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.DeleteSmall, {
        __self: void 0,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 81,
          columnNumber: 19
        }
      })))),
      width: 'max-content',
      align: 'right'
    }],
    verticalPadding: "tiny",
    showDivider: !isLastTag,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 36,
      columnNumber: 5
    }
  });
};
exports.TagsListItemView = TagsListItemView;
//# sourceMappingURL=TagListItemView.js.map