"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports._DeleteFieldModal = exports.DeleteFieldModal = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _react2 = require("@wix/bex-core/react");
var _ActionModal = require("../ActionModal");
var _mobxReactLite = require("mobx-react-lite");
var _Trans = require("../Trans");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/ArchivedItemsPanel/DeleteFieldModal.tsx";
const _DeleteFieldModal = ({
  state
}) => {
  var _dataExtension$extrac, _modal$value, _dataExtension$extrac2, _modal$value2;
  const container = (0, _react2.useWixPatternsContainer)();
  const {
    translate: t
  } = container;
  const {
    dataExtension,
    modal
  } = state;
  return /*#__PURE__*/_react.default.createElement(_ActionModal.MessageActionModal, {
    dataHook: "archived-items-delete-confirm-modal",
    state: modal,
    skin: "destructive",
    title: t('cairo.customFields.delete.modal.title', {
      selectedField: ((_dataExtension$extrac = dataExtension.extractFieldValuesFromSchema(((_modal$value = modal.value) == null ? void 0 : _modal$value.id) || '')) == null ? void 0 : _dataExtension$extrac.name) || ''
    }),
    content: /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 29,
        columnNumber: 9
      }
    }, /*#__PURE__*/_react.default.createElement(_Trans.Trans, {
      i18nKey: "cairo.customFields.delete.modal.description",
      values: {
        selectedField: ((_dataExtension$extrac2 = dataExtension.extractFieldValuesFromSchema(((_modal$value2 = modal.value) == null ? void 0 : _modal$value2.id) || '')) == null ? void 0 : _dataExtension$extrac2.name) || ''
      },
      components: {
        bold: /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
          weight: "bold",
          __self: void 0,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 39,
            columnNumber: 21
          }
        })
      },
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 30,
        columnNumber: 11
      }
    })),
    primaryButtonText: t('cairo.customFields.delete.modal.delete.CTA'),
    secondaryButtonText: t('cairo.customFields.delete.modal.cancel.CTA'),
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 19,
      columnNumber: 5
    }
  });
};
exports._DeleteFieldModal = _DeleteFieldModal;
const DeleteFieldModal = exports.DeleteFieldModal = (0, _mobxReactLite.observer)(_DeleteFieldModal);
//# sourceMappingURL=DeleteFieldModal.js.map