"use strict";

exports.__esModule = true;
exports.Footer = void 0;
var _react = _interopRequireWildcard(require("react"));
var _designSystem = require("@wix/design-system");
var _react2 = require("@wix/bex-core/react");
var _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/Tags/BulkAssignTagsPopover/Footer.tsx";
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const _Footer = ({
  state
}) => {
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  const closePopover = (0, _react.useCallback)(() => {
    state.closePopover();
  }, [state]);
  const applyChanges = (0, _react.useCallback)(() => {
    state.applyChanges();
  }, [state]);
  const handleManageTagsCtaClick = (0, _react.useCallback)(() => {
    state.handleManageTagsCtaClick();
  }, [state]);
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    height: "54px",
    width: "100%",
    direction: "vertical",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 28,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Divider, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 29,
      columnNumber: 7
    }
  }), /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    height: "100%",
    align: "space-between",
    verticalAlign: "middle",
    padding: "0 SP3",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30,
      columnNumber: 7
    }
  }, !state.isLoading && !state.isError && /*#__PURE__*/_react.default.createElement(_designSystem.TextButton, {
    dataHook: "bulk-assign-tags-manage-tags-button",
    size: "small",
    onClick: handleManageTagsCtaClick,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37,
      columnNumber: 11
    }
  }, t('cairo.tags.collectionPage.popover.manage.CTA')), /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    marginLeft: "auto",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 45,
      columnNumber: 9
    }
  }, state.isDirty ? /*#__PURE__*/_react.default.createElement(_designSystem.Button, {
    onClick: applyChanges,
    dataHook: "bulk-assign-tags-apply-button",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 47,
      columnNumber: 13
    }
  }, t('cairo.tags.collectionPage.applyChanges.CTA')) : /*#__PURE__*/_react.default.createElement(_designSystem.Button, {
    onClick: closePopover,
    dataHook: "bulk-assign-tags-close-button",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 54,
      columnNumber: 13
    }
  }, t('cairo.tags.collectionPage.popover.close.CTA')))));
};
const Footer = exports.Footer = (0, _mobxReactLite.observer)(_Footer);
//# sourceMappingURL=Footer.js.map