"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _reactIntl = require("react-intl");

var _jsxRuntime = require("react/jsx-runtime");

var _excluded = ["formData", "schema"];

var _default = function _default(_ref) {
  var formData = _ref.formData,
      schema = _ref.schema,
      props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);

  if (schema["enum"]) {
    return props.uiSchema["ui:options"].element.yes || /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
      id: "F0dHQ0",
      defaultMessage: [{
        "type": 0,
        "value": "Hyväksyn"
      }]
    });
  } else {
    var defaultEnumNames = [schema.enumNames[0] === '' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
      id: "4ajajg",
      defaultMessage: [{
        "type": 0,
        "value": "Kyllä"
      }]
    }) : schema.enumNames[0], schema.enumNames[1] === '' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
      id: "JVSOMe",
      defaultMessage: [{
        "type": 0,
        "value": "Ei"
      }]
    }) : schema.enumNames[1]];
    return formData === undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
      id: "nk8wjQ",
      defaultMessage: [{
        "type": 0,
        "value": "Ei valintaa"
      }]
    }) : defaultEnumNames === null || defaultEnumNames === void 0 ? void 0 : defaultEnumNames[formData ? 0 : 1];
  }
};

exports["default"] = _default;
//# sourceMappingURL=boolean.cjs.map