"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.PiiFormFields = PiiFormFields;
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _Trans = require("../Trans");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CustomFieldModal/CustomFieldFormPiiFields.tsx";
function PiiFormFields({
  containsPii,
  mode,
  language
}) {
  const translateKeys = {
    toggleName: 'cairo.customFields.addCustomField.modal.PII-setting.toggle.name',
    toggleInfo: 'cairo.customFields.addCustomField.modal.PII-setting.toggle.info',
    toggleEditNote: 'cairo.customFields.addCustomField.modal.PII-setting.toggle.editNote'
  };
  const whyIsItImportantLink = `https://support.wix.com/${language}/article/about-personally-identifiable-information-pii`;
  return /*#__PURE__*/_react.default.createElement(_designSystem.Cell, {
    span: 12,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.FormField, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 39,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    gap: "SP1",
    marginBlockEnd: "6px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 40,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.ToggleSwitch, {
    dataHook: "pii-toggle-switch",
    size: "small",
    disabled: mode === 'edit',
    checked: containsPii.value,
    onChange: e => containsPii.onChange(e.target.checked),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41,
      columnNumber: 11
    }
  }), /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
    size: "small",
    dataHook: "pii-toggle-name",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 48,
      columnNumber: 11
    }
  }, /*#__PURE__*/_react.default.createElement(_Trans.Trans, {
    i18nKey: translateKeys.toggleName,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 49,
      columnNumber: 13
    }
  })), /*#__PURE__*/_react.default.createElement(_designSystem.InfoIcon, {
    size: "small",
    content: /*#__PURE__*/_react.default.createElement(_Trans.Trans, {
      i18nKey: translateKeys.toggleInfo,
      components: {
        linkVal: /*#__PURE__*/_react.default.createElement(_designSystem.TextButton, {
          as: "a",
          href: whyIsItImportantLink,
          underline: "always",
          size: "small",
          target: "_blank",
          __self: this,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 58,
            columnNumber: 21
          }
        })
      },
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 54,
        columnNumber: 15
      }
    }),
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 51,
      columnNumber: 11
    }
  }))), /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 72,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Text, {
    size: "small",
    dataHook: "pii-toggle-edit-note",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 73,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_Trans.Trans, {
    i18nKey: translateKeys.toggleEditNote,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 74,
      columnNumber: 11
    }
  }))));
}
//# sourceMappingURL=CustomFieldFormPiiFields.js.map