diff --git a/libs/application/templates/driving-license-duplicate/src/fields/Alert.tsx b/libs/application/templates/driving-license-duplicate/src/fields/Alert.tsx index 97547f2646d6..da86370f043b 100644 --- a/libs/application/templates/driving-license-duplicate/src/fields/Alert.tsx +++ b/libs/application/templates/driving-license-duplicate/src/fields/Alert.tsx @@ -27,7 +27,7 @@ export const Alert: FC> = ({ }) => { const { formatMessage } = useLocale() const { title, type, message, heading } = field.props as Field - console.log('message', formatText(message, application, formatMessage)) + return ( {heading && ( diff --git a/libs/application/templates/driving-license/src/fields/AdvancedLicenseSelection/AdvancedLicenseSelection.tsx b/libs/application/templates/driving-license/src/fields/AdvancedLicenseSelection/AdvancedLicenseSelection.tsx new file mode 100644 index 000000000000..7976512917fc --- /dev/null +++ b/libs/application/templates/driving-license/src/fields/AdvancedLicenseSelection/AdvancedLicenseSelection.tsx @@ -0,0 +1,130 @@ +import React, { FC, useEffect, useState } from 'react' + +import { Box, Checkbox, ErrorMessage, Text } from '@island.is/island-ui/core' +import { FieldBaseProps } from '@island.is/application/types' +import { useFormContext } from 'react-hook-form' +import { + organizedAdvancedLicenseMap, + AdvancedLicense as AdvancedLicenseEnum, +} from '../../lib/constants' +import { useLocale } from '@island.is/localization' +import { m } from '../../lib/messages' + +const AdvancedLicenseSelection: FC> = ({ + errors, +}) => { + const { formatMessage } = useLocale() + const { setValue, watch } = useFormContext() + + const requiredMessage = (errors as { advancedLicense?: string }) + ?.advancedLicense + ? formatMessage(m.applicationForAdvancedRequiredError) + : '' + + const advancedLicenseValue = watch('advancedLicense') ?? [] + + const [selectedLicenses, setSelectedLicenses] = + useState>(advancedLicenseValue) + + useEffect(() => { + setValue('advancedLicense', selectedLicenses) + }, [selectedLicenses, setValue]) + + return ( + + {Object.entries(organizedAdvancedLicenseMap).map(([, options], index) => { + const group = options.find((x) => x.group)?.group + const groupAge = options.find((x) => x.minAge)?.minAge + + return ( + + + + {group ? formatMessage(m[`groupTitle${group}`]) : ''} + + + {formatMessage(m[`applicationForAdvancedAgeRequired`], { + age: String(groupAge), + })} + + + {options.map((option) => { + const name = `field-${option.code}` + + return ( + + { + setSelectedLicenses((prev) => { + return prev.includes(option.code) + ? prev + .filter((item) => item !== option.code) + .filter( + (item) => item !== option.professional?.code, + ) + : [...prev, option.code] + }) + }} + /> + {option?.professional?.code && ( + + { + setSelectedLicenses((prev) => { + if (e.target.checked && option.professional?.code) { + return [...prev, option.professional.code] + } + + return prev.filter( + (item) => item !== option.professional?.code, + ) + }) + }} + /> + + )} + + ) + })} + + ) + })} + {!selectedLicenses?.length && requiredMessage && ( + +
{requiredMessage}
+
+ )} +
+ ) +} + +export { AdvancedLicenseSelection } diff --git a/libs/application/templates/driving-license/src/fields/AdvancedLicenseSelection/index.tsx b/libs/application/templates/driving-license/src/fields/AdvancedLicenseSelection/index.tsx new file mode 100644 index 000000000000..051ad8e7ef5f --- /dev/null +++ b/libs/application/templates/driving-license/src/fields/AdvancedLicenseSelection/index.tsx @@ -0,0 +1 @@ +export { AdvancedLicenseSelection } from './AdvancedLicenseSelection' diff --git a/libs/application/templates/driving-license/src/fields/index.ts b/libs/application/templates/driving-license/src/fields/index.ts index 6f42ecaa4bb4..6e5d3bd15a6b 100644 --- a/libs/application/templates/driving-license/src/fields/index.ts +++ b/libs/application/templates/driving-license/src/fields/index.ts @@ -4,5 +4,6 @@ export { EligibilitySummary } from './EligibilitySummary' export { SubmitAndDecline } from './SubmitAndDecline' export { LinkExistingApplication } from './LinkExistingApplication' export { PaymentPending } from './PaymentPending' +export { AdvancedLicenseSelection } from './AdvancedLicenseSelection' export { QualityPhoto } from './QualityPhoto' export { default as HealthRemarks } from './HealthRemarks' diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts b/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts index 9bf9a5b197a7..28d94b416070 100644 --- a/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts +++ b/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts @@ -8,13 +8,23 @@ import { sectionApplicationFor } from './sectionApplicationFor' import { sectionRequirements } from './sectionRequirements' import { sectionExistingApplication } from './sectionExistingApplication' import { sectionDigitalLicenseInfo } from './sectionDigitalLicenseInfo' +import { sectionAdvancedLicenseSelection } from './sectionAdvancedLicenseSelection' + +interface DrivingLicenseFormConfig { + allowFakeData?: boolean + allowPickLicense?: boolean + allowBELicense?: boolean + allow65Renewal?: boolean + allowAdvanced?: boolean +} export const getForm = ({ allowFakeData = false, allowPickLicense = false, allowBELicense = false, allow65Renewal = false, -}): Form => + allowAdvanced = false, +}: DrivingLicenseFormConfig): Form => buildForm({ id: 'DrivingLicenseApplicationPrerequisitesForm', title: '', @@ -31,8 +41,15 @@ export const getForm = ({ sectionExternalData, sectionExistingApplication, ...(allowPickLicense - ? [sectionApplicationFor(allowBELicense, allow65Renewal)] + ? [ + sectionApplicationFor( + allowBELicense, + allow65Renewal, + allowAdvanced, + ), + ] : []), + ...(allowAdvanced ? [sectionAdvancedLicenseSelection] : []), sectionDigitalLicenseInfo, sectionRequirements, ], diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/sectionAdvancedLicenseSelection.ts b/libs/application/templates/driving-license/src/forms/prerequisites/sectionAdvancedLicenseSelection.ts new file mode 100644 index 000000000000..e58582a6577b --- /dev/null +++ b/libs/application/templates/driving-license/src/forms/prerequisites/sectionAdvancedLicenseSelection.ts @@ -0,0 +1,35 @@ +import { + buildCustomField, + buildMultiField, + buildSubSection, + getValueViaPath, +} from '@island.is/application/core' +import { m } from '../../lib/messages' +import { LicenseTypes } from '../../lib/constants' + +export const sectionAdvancedLicenseSelection = buildSubSection({ + id: 'sectionAdvancedLicenseSelection', + title: m.applicationForAdvancedLicenseTitle, + condition: (answers) => { + const applicationFor = getValueViaPath( + answers, + 'applicationFor', + ) + + return applicationFor != null && applicationFor === LicenseTypes.B_ADVANCED + }, + children: [ + buildMultiField({ + id: 'advancedLicenseSelectionFields', + title: m.applicationForAdvancedLicenseSectionTitle, + description: m.applicationForAdvancedLicenseSectionDescription, + children: [ + buildCustomField({ + id: 'advancedLicense', + title: '', + component: 'AdvancedLicenseSelection', + }), + ], + }), + ], +}) diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts b/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts index cf6ba528b6bb..571231ab2c73 100644 --- a/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts +++ b/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts @@ -7,6 +7,7 @@ import { import { m } from '../../lib/messages' import { DrivingLicense } from '../../lib/types' import { + B_ADVANCED, B_FULL, B_FULL_RENEWAL_65, B_TEMP, @@ -17,6 +18,7 @@ import { export const sectionApplicationFor = ( allowBELicense = false, allow65Renewal = false, + allowAdvanced = false, ) => buildSubSection({ id: 'applicationFor', @@ -112,6 +114,17 @@ export const sectionApplicationFor = ( }) } + if (allowAdvanced) { + options = options.concat({ + label: m.applicationForAdvancedLicenseTitle, + subLabel: m.applicationForAdvancedLicenseDescription, + value: B_ADVANCED, + disabled: !categories?.some( + (c) => c.nr.toUpperCase() === 'B' && c.validToCode !== 8, + ), + }) + } + return options }, }), diff --git a/libs/application/templates/driving-license/src/lib/constants.ts b/libs/application/templates/driving-license/src/lib/constants.ts index 0e4e00652e02..c10fc573f53b 100644 --- a/libs/application/templates/driving-license/src/lib/constants.ts +++ b/libs/application/templates/driving-license/src/lib/constants.ts @@ -8,9 +8,141 @@ export enum ApiActions { export const B_FULL = 'B-full' export const B_TEMP = 'B-temp' export const B_FULL_RENEWAL_65 = 'B-full-renewal-65' +export const B_ADVANCED = 'B-advanced' export const BE = 'BE' export const DELIVERY_FEE = 'deliveryFee' +export enum LicenseTypes { + 'B_FULL' = 'B-full', + 'B_TEMP' = 'B-temp', + 'B_FULL_RENEWAL_65' = 'B-full-renewal-65', + 'BE' = 'BE', + 'B_ADVANCED' = 'B-advanced', +} + +export enum Pickup { + 'POST' = 'post', + 'DISTRICT' = 'district', +} + +export enum AdvancedLicenseGroupCodes { + 'C1' = 'C1', + 'C' = 'C', + 'D1' = 'D1', + 'D' = 'D', +} + +export enum MainAdvancedLicense { + 'C1' = 'C1', + 'D1' = 'D1', + 'C' = 'C', + 'D' = 'D', + 'C1E' = 'C1E', + 'D1E' = 'D1E', + 'CE' = 'CE', + 'DE' = 'DE', +} + +export enum ProfessionalAdvancedLicense { + 'C1A' = 'C1A', + 'D1A' = 'D1A', + 'CA' = 'CA', + 'DA' = 'DA', +} + +export const AdvancedLicense = { + ...MainAdvancedLicense, + ...ProfessionalAdvancedLicense, +} as const + +type AdvancedLicenseMapItem = { + minAge: number + group: keyof typeof AdvancedLicenseGroupCodes + code: keyof typeof MainAdvancedLicense + professional?: { + minAge: number + code: keyof typeof ProfessionalAdvancedLicense + } +} + +export const advancedLicenseMap: AdvancedLicenseMapItem[] = [ + // C1 + { + code: 'C1', + group: 'C1', + minAge: 18, + professional: { + code: 'C1A', + minAge: 18, + }, + }, + { + code: 'C1E', + group: 'C1', + minAge: 18, + }, + + // C + { + code: 'C', + group: 'C', + minAge: 21, + professional: { + code: 'CA', + minAge: 21, + }, + }, + { + code: 'CE', + group: 'C', + minAge: 21, + }, + + // D1 + { + code: 'D1', + group: 'D1', + minAge: 21, + professional: { + code: 'D1A', + minAge: 21, + }, + }, + { + code: 'D1E', + group: 'D1', + minAge: 21, + }, + + // D + { + code: 'D', + group: 'D', + minAge: 23, + professional: { + code: 'DA', + minAge: 23, + }, + }, + { + code: 'DE', + group: 'D', + minAge: 23, + }, +] + +export const organizedAdvancedLicenseMap = advancedLicenseMap.reduce< + Record +>((acc, item) => { + if (!acc[item.group]) { + acc[item.group] = [] + } + + acc[item.group].push(item) + + return acc +}, {}) + export const CHARGE_ITEM_CODES: Record = { [B_TEMP]: 'AY114', [B_FULL]: 'AY110', diff --git a/libs/application/templates/driving-license/src/lib/dataSchema.ts b/libs/application/templates/driving-license/src/lib/dataSchema.ts index 82d68194a468..981719fbf325 100644 --- a/libs/application/templates/driving-license/src/lib/dataSchema.ts +++ b/libs/application/templates/driving-license/src/lib/dataSchema.ts @@ -1,5 +1,14 @@ import { z } from 'zod' -import { YES, NO, B_FULL_RENEWAL_65, BE, B_TEMP, B_FULL } from './constants' +import { + YES, + NO, + B_FULL_RENEWAL_65, + BE, + B_TEMP, + B_FULL, + B_ADVANCED, + AdvancedLicense, +} from './constants' import { parsePhoneNumberFromString } from 'libphonenumber-js' import { Pickup } from './types' @@ -36,7 +45,13 @@ export const dataSchema = z.object({ ]), requirementsMet: z.boolean().refine((v) => v), certificate: z.array(z.enum([YES, NO])).nonempty(), - applicationFor: z.enum([B_FULL, B_TEMP, BE, B_FULL_RENEWAL_65]), + applicationFor: z.enum([B_FULL, B_TEMP, BE, B_FULL_RENEWAL_65, B_ADVANCED]), + advancedLicense: z + .array(z.enum(Object.values(AdvancedLicense) as [string, ...string[]])) + .nonempty() + .refine((value) => { + return value.length > 0 + }), email: z.string().email(), phone: z.string().refine((v) => isValidPhoneNumber(v)), drivingInstructor: z.string().min(1), diff --git a/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts b/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts index d7c7a9ea2d27..56ea5c57742f 100644 --- a/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts +++ b/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts @@ -53,7 +53,7 @@ import { Pickup } from './types' const getCodes = (application: Application) => { const applicationFor = getValueViaPath< - 'B-full' | 'B-temp' | 'BE' | 'B-full-renewal-65' + 'B-full' | 'B-temp' | 'BE' | 'B-full-renewal-65' | 'B-advanced' >(application.answers, 'applicationFor', 'B-full') const pickup = getValueViaPath(application.answers, 'pickup') @@ -142,6 +142,8 @@ const template: ApplicationTemplate< featureFlags[DrivingLicenseFeatureFlags.ALLOW_BE_LICENSE], allow65Renewal: featureFlags[DrivingLicenseFeatureFlags.ALLOW_65_RENEWAL], + allowAdvanced: + featureFlags[DrivingLicenseFeatureFlags.ALLOW_ADVANCED], }) }, write: 'all', diff --git a/libs/application/templates/driving-license/src/lib/getApplicationFeatureFlags.ts b/libs/application/templates/driving-license/src/lib/getApplicationFeatureFlags.ts index 9a7186289db8..2905a9b30d89 100644 --- a/libs/application/templates/driving-license/src/lib/getApplicationFeatureFlags.ts +++ b/libs/application/templates/driving-license/src/lib/getApplicationFeatureFlags.ts @@ -5,6 +5,7 @@ export enum DrivingLicenseFeatureFlags { ALLOW_LICENSE_SELECTION = 'applicationTemplateDrivingLicenseAllowLicenseSelection', ALLOW_BE_LICENSE = 'isBEApplicationEnabled', ALLOW_65_RENEWAL = 'is65RenewalApplicationEnabled', + ALLOW_ADVANCED = 'isDrivingLicenseAdvancedEnabled', } export const getApplicationFeatureFlags = async ( @@ -15,6 +16,7 @@ export const getApplicationFeatureFlags = async ( DrivingLicenseFeatureFlags.ALLOW_LICENSE_SELECTION, DrivingLicenseFeatureFlags.ALLOW_BE_LICENSE, DrivingLicenseFeatureFlags.ALLOW_65_RENEWAL, + DrivingLicenseFeatureFlags.ALLOW_ADVANCED, ] return ( diff --git a/libs/application/templates/driving-license/src/lib/messages.ts b/libs/application/templates/driving-license/src/lib/messages.ts index 07431e977201..778c8fa73979 100644 --- a/libs/application/templates/driving-license/src/lib/messages.ts +++ b/libs/application/templates/driving-license/src/lib/messages.ts @@ -878,6 +878,164 @@ export const m = defineMessages({ description: 'Health declaration answers indicate that health certificate is required and BE application does not support health certificate requirement', }, + applicationForAdvancedLicenseTitle: { + id: 'dl.application:applicationForAdvancedLicenseTitle', + defaultMessage: 'Aukin ökuréttindi / meirapróf', + description: 'Option title for selecting advanced driving license', + }, + applicationForAdvancedLicenseDescription: { + id: 'dl.application:applicationForAdvancedLicenseDescription', + defaultMessage: 'Texti kemur hér', + description: 'Option description for selecting advanced driving license', + }, + applicationForAdvancedLicenseSectionTitle: { + id: 'dl.application:applicationForAdvancedLicenseSectionTitle', + defaultMessage: 'Veldu réttindi', + description: 'Option title for selecting advanced driving license', + }, + applicationForAdvancedLicenseSectionDescription: { + id: 'dl.application:applicationForAdvancedLicenseSectionDescription', + defaultMessage: 'Í þessari umsókn er verið að sækja um:', + description: 'Option description for selecting advanced driving license', + }, + applicationForAdvancedAgeRequired: { + id: 'dl.application:applicationForAdvancedAgeFor', + defaultMessage: 'Réttindaaldur er {age} ára.', + description: 'Required age for {licenses} is {age} years', + }, + groupTitleC1: { + id: 'dl.application:groupTitleC1', + defaultMessage: 'Minni vörubíll og eftirvagn (C1 og C1E)', + description: 'C1 group title', + }, + groupTitleC: { + id: 'dl.application:groupTitleC1', + defaultMessage: 'Vörubíll og eftirvagn (C og CE)', + description: 'C1 group title', + }, + groupTitleD1: { + id: 'dl.application:groupTitleC1', + defaultMessage: 'Lítil rúta og eftirvagn (D1 og D1E)', + description: 'C1 group title', + }, + groupTitleD: { + id: 'dl.application:groupTitleC1', + defaultMessage: 'Stór rúta og eftirvagn (D og DE)', + description: 'C1 group title', + }, + applicationForAdvancedLicenseTitleC1: { + id: 'dl.application:applicationForAdvancedLicenseTitleC1', + defaultMessage: 'Minni vörubíll (C1)', + description: 'C1 title', + }, + applicationForAdvancedLicenseLabelC1: { + id: 'dl.application:applicationForAdvancedLicenseLabelC1', + defaultMessage: + 'Gefur réttindi til að aka bifreið fyrir 8 farþega eða færri, sem er þyngri en 3.500 kg en þó ekki þyngri en 7.500 kg. Sá sem hefur C1 réttindi má tengja eftirvagn/tengitæki sem er 750 kg eða minna af leyfðri heildarþyngd. Til þess að mega draga þyngri eftirvagna/tengitæki þarf að taka C1E réttindi.', + description: 'C1 description', + }, + applicationForAdvancedLicenseLabelC1A: { + id: 'dl.application:applicationForAdvancedLicenseLabelC1A', + defaultMessage: 'Sækja um leyfi í atvinnuskyni', + description: 'C1A description', + }, + applicationForAdvancedLicenseTitleD1: { + id: 'dl.application:applicationForAdvancedLicenseTitleD1', + defaultMessage: 'Lítil rúta (D1)', + description: 'D1 title', + }, + applicationForAdvancedLicenseLabelD1: { + id: 'dl.application:applicationForAdvancedLicenseLabelD1', + defaultMessage: + 'Gefur réttindi til að aka hópbifreið sem er gerð fyrir að hámarki 16 farþega. Sá sem hefur D1 réttindi má tengja eftirvagn/tengitæki sem er 750 kg eða minna að leyfðri heildarþyngd.', + description: 'D1 description', + }, + applicationForAdvancedLicenseLabelD1A: { + id: 'dl.application:applicationForAdvancedLicenseLabelD1A', + defaultMessage: 'Sækja um leyfi í atvinnuskyni', + description: 'D1A description', + }, + applicationForAdvancedLicenseTitleC: { + id: 'dl.application:applicationForAdvancedLicenseTitleC', + defaultMessage: 'Vörubíll (C)', + description: 'C title', + }, + applicationForAdvancedLicenseLabelC: { + id: 'dl.application:applicationForAdvancedLicenseLabelC', + defaultMessage: + 'Gefur réttindi til að aka vörubifreið fyrir 8 farþega eða færri, sem er þyngri en 7.500 kg. C flokkur gefur einnig réttindi til að aka bifreiðinni með eftirvagni sem er 750 kg eða minna af leyfðri heildarþyngd.', + description: 'C description', + }, + applicationForAdvancedLicenseLabelCA: { + id: 'dl.application:applicationForAdvancedLicenseLabelCA', + defaultMessage: 'Sækja um leyfi í atvinnuskyni', + description: 'CA description', + }, + applicationForAdvancedLicenseTitleD: { + id: 'dl.application:applicationForAdvancedLicenseTitleD', + defaultMessage: 'Stór rúta (D)', + description: 'D title', + }, + applicationForAdvancedLicenseLabelD: { + id: 'dl.application:applicationForAdvancedLicenseLabelD', + defaultMessage: + 'Gefur réttindi til að aka bifreið sem gerð er fyrir fleiri en 8 farþega auk ökumanns. Sá sem hefur D réttindi má tengja eftirvagn/tengitæki sem er 750 kg eða minna af leyfðri heildarþyngd.', + description: 'D description', + }, + applicationForAdvancedLicenseLabelDA: { + id: 'dl.application:applicationForAdvancedLicenseLabelDA', + defaultMessage: 'Sækja um leyfi í atvinnuskyni', + description: 'DA description', + }, + applicationForAdvancedLicenseTitleC1E: { + id: 'dl.application:applicationForAdvancedLicenseTitleC1E', + defaultMessage: 'Minni vörubíll og eftirvagn (C1E)', + description: 'C1E title', + }, + applicationForAdvancedLicenseLabelC1E: { + id: 'dl.application:applicationForAdvancedLicenseLabelC1E', + defaultMessage: + 'Gefur réttindi til að aka vörubifreið/stórum pallbíl í flokki C1 með eftirvagni sem er þyngri en 750 kg að heildarþunga. Þó má sameiginlegur heildarþungi beggja ökutækja ekki fara yfir 12.000 kg. ', + description: 'C1E description', + }, + applicationForAdvancedLicenseTitleD1E: { + id: 'dl.application:applicationForAdvancedLicenseTitleD1E', + defaultMessage: 'Lítil rúta og eftirvagn (D1)', + description: 'D1E title', + }, + applicationForAdvancedLicenseLabelD1E: { + id: 'dl.application:applicationForAdvancedLicenseLabelD1E', + defaultMessage: + 'Gefur réttindi til að aka bifreið í B-flokki með eftirvagn í BE-flokki og hópbifreið í D1 flokki með eftirvagn sem er þyngri en 750 kg að heildarþunga. Þó má sameiginlegur heildarþungi beggja ökutækja ekki fara yfir 12.000 kg.', + description: 'D1E description', + }, + applicationForAdvancedLicenseTitleCE: { + id: 'dl.application:applicationForAdvancedLicenseTitleCE', + defaultMessage: 'Vörubíll og eftirvagn (CE)', + description: 'CE title', + }, + applicationForAdvancedLicenseLabelCE: { + id: 'dl.application:applicationForAdvancedLicenseLabelCE', + defaultMessage: + 'Gefur réttindi til að aka vörubifreið í flokki C með eftirvagni sem er þyngri en 750 kg að heildarþunga.', + description: 'CE description', + }, + applicationForAdvancedLicenseTitleDE: { + id: 'dl.application:applicationForAdvancedLicenseTitleDE', + defaultMessage: 'Stór rúta og eftirvagn (DE)', + description: 'DE title', + }, + applicationForAdvancedLicenseLabelDE: { + id: 'dl.application:applicationForAdvancedLicenseLabelDE', + defaultMessage: + 'Að loknum D réttindum, er hægt að taka að auki DE, sem gefur réttindi til að aka hópbifreið í flokki D með eftirvagni sem er þyngri en 750 kg að heildarþunga. Þeir nemendur sem taka eftirvagnaréttindi í flokki DE og gilda þau réttindi einnig fyrir CE.', + description: 'DE description', + }, + applicationForAdvancedRequiredError: { + id: 'dl.application:applicationForAdvancedRequiredError', + defaultMessage: 'Þú verður að velja að minnsta kosti einn valmöguleika', + description: 'You must select at least one option', + }, }) export const requirementsMessages = defineMessages({