"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.AddCustomFieldCTAButton = void 0;
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _react2 = require("@wix/bex-core/react");
var _CustomFields = require("../CustomFields");
var _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CustomFieldsPanel/AddCustomFieldCTAButton.tsx";
function _AddCustomFieldCTAButton({
  state,
  onClick,
  dataHook = 'data-extension-add-new'
}) {
  const container = (0, _react2.useWixPatternsContainer)();
  const {
    translate: t
  } = container;
  if (state.dataExtension.disableUserDefinedWriting) {
    return null;
  }
  return /*#__PURE__*/_react.default.createElement(_CustomFields.CustomFieldsDisabledHint, {
    disabled: state.dataExtension.disableAddCustomField,
    content: state.dataExtension.disableAddCustomFieldContent,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 27,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.AddItem, {
    dataHook: dataHook,
    onClick: onClick,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 7
    }
  }, t('cairo.customFields.addCustomField.CTA')));
}
const AddCustomFieldCTAButton = exports.AddCustomFieldCTAButton = (0, _mobxReactLite.observer)(_AddCustomFieldCTAButton);
//# sourceMappingURL=AddCustomFieldCTAButton.js.map