"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.FieldIndications = 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 _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CustomColumnsPanel/FieldIndications.tsx";
function _FieldIndications({
  column
}) {
  const {
    translate: t
  } = (0, _react2.useWixPatternsContainer)();
  const {
    isPii,
    isPrimary,
    isSystem,
    dataExtension
  } = column;
  const isDataExtension = !!dataExtension;
  const isNonEditableAppField = !isSystem && isDataExtension && !(dataExtension != null && dataExtension.editable);
  const isEditableAppField = !isSystem && isDataExtension && (dataExtension == null ? void 0 : dataExtension.editable);
  const hasAny = isPii || isPrimary || isSystem || isDataExtension;
  if (!hasAny) {
    return null;
  }
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    gap: "SP1",
    verticalAlign: "middle",
    inline: true,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30,
      columnNumber: 5
    }
  }, isPii && /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
    key: "pii",
    content: t('cairo.table.custom-columns.indication.pii.tooltip'),
    appendTo: "window",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 32,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    align: "center",
    verticalAlign: "middle",
    color: "G10",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37,
      columnNumber: 11
    }
  }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.LockLockedFilledSmall, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38,
      columnNumber: 13
    }
  }))), isPrimary && /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
    key: "primary",
    content: t('cairo.table.custom-columns.indication.primary.tooltip'),
    appendTo: "window",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 43,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    align: "center",
    verticalAlign: "middle",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 48,
      columnNumber: 11
    }
  }, /*#__PURE__*/_react.default.createElement(_wixUiIconsCommon.FlagFilledSmall, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 49,
      columnNumber: 13
    }
  }))), isSystem && /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
    key: "system",
    content: t('cairo.table.custom-columns.indication.system.tooltip'),
    appendTo: "window",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 54,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Badge, {
    size: "tiny",
    skin: "neutralLight",
    type: "outlined",
    uppercase: false,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 59,
      columnNumber: 11
    }
  }, t('cairo.table.custom-columns.indication.system'))), isNonEditableAppField && /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
    key: "app",
    content: t('cairo.table.custom-columns.indication.app.tooltip'),
    appendTo: "window",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 70,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Badge, {
    size: "tiny",
    skin: "neutralLight",
    type: "outlined",
    uppercase: false,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 75,
      columnNumber: 11
    }
  }, t('cairo.table.custom-columns.indication.app'))), isEditableAppField && /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, {
    key: "user",
    content: t('cairo.table.custom-columns.indication.user.tooltip'),
    appendTo: "window",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 86,
      columnNumber: 9
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.Badge, {
    size: "tiny",
    skin: "neutralLight",
    type: "outlined",
    uppercase: false,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 91,
      columnNumber: 11
    }
  }, t('cairo.table.custom-columns.indication.user'))));
}
const FieldIndications = exports.FieldIndications = (0, _mobxReactLite.observer)(_FieldIndications);
//# sourceMappingURL=FieldIndications.js.map