UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

25 lines (24 loc) 1.58 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const react_intl_1 = require("react-intl"); const select_1 = __importDefault(require("../../../components/formio/select")); const IDENTIFIER_ROLE_OPTIONS = [ { label: (0, react_intl_1.defineMessage)({ id: "RPzjrJ", defaultMessage: [{ type: 0, value: "Main" }] }), value: 'main', }, { label: (0, react_intl_1.defineMessage)({ id: "cJnAgZ", defaultMessage: [{ type: 0, value: "Authorised person" }] }), value: 'authorised_person', }, ]; const PrefillIdentifierRoleSelect = () => { const intl = (0, react_intl_1.useIntl)(); const tooltip = intl.formatMessage({ id: "WkBjB5", defaultMessage: [{ type: 0, value: "In case that multiple identifiers are returned (in the case of eHerkenning bewindvoering and DigiD Machtigen), should the prefill data related to the main identifier be used, or that related to the authorised person?" }] }); return ((0, jsx_runtime_1.jsx)(select_1.default, { name: "prefill.identifierRole", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'E5rUfM', defaultMessage: [{ type: 0, value: "Identifier role" }] }), tooltip: tooltip, options: IDENTIFIER_ROLE_OPTIONS.map(item => (Object.assign(Object.assign({}, item), { label: intl.formatMessage(item.label) }))) })); }; exports.default = PrefillIdentifierRoleSelect;