@@ -8,6 +8,7 @@ export type FormId =
88 | 'state_scanned'
99 | 'cerfa_12485'
1010 | 'cerfa_14598'
11+ | 'pre_anesthesia'
1112 | 'custom'
1213
1314export type FormConfig = {
@@ -85,6 +86,12 @@ const ALL_FORMS: Record<FormId, FormConfig> = {
8586 labelKey : 'forms.labels.cerfa14598' ,
8687 pdfUrl : `${ CDN_BASE } /form-copilot/cerfa-14598.pdf` ,
8788 } ,
89+ pre_anesthesia : {
90+ id : 'pre_anesthesia' ,
91+ useCaseKey : 'forms.useCases.healthcare' ,
92+ labelKey : 'forms.labels.preAnesthesia' ,
93+ pdfUrl : `${ CDN_BASE } /form-copilot/pre-anesthesia.pdf` ,
94+ } ,
8895 custom : {
8996 id : 'custom' ,
9097 useCaseKey : 'forms.useCases.custom' ,
@@ -95,11 +102,20 @@ const ALL_FORMS: Record<FormId, FormConfig> = {
95102
96103const EN_ORDER : FormId [ ] = [ 'custom' , 'w9' , 'w4' , 'i9' , 'healthcare' , 'hr' ]
97104const NL_ORDER : FormId [ ] = [ 'custom' , 'state' , 'state_scanned' ]
98- const FR_ORDER : FormId [ ] = [ 'custom' , 'cerfa_12485' , 'cerfa_14598' ]
105+ const FR_ORDER : FormId [ ] = [ 'custom' , 'pre_anesthesia' , ' cerfa_12485', 'cerfa_14598' ]
99106const FALLBACK_ORDER : FormId [ ] = [ 'custom' , 'w9' ]
100107
101108export const DEFAULT_FORM_ID : FormId = 'w9'
102109
110+ // Per-locale landing default. The picker order's first non-custom entry is
111+ // the form a visitor sees on their first paint when no `?form=` is set.
112+ export const getDefaultFormIdForLocale = ( locale : string ) : FormId => {
113+ if ( locale === 'fr' ) {
114+ return 'pre_anesthesia'
115+ }
116+ return DEFAULT_FORM_ID
117+ }
118+
103119// Locale-specific form catalogues. Non-EN locales default to a single
104120// language-appropriate form (plus the "pick your own" slot). The use-case
105121// modal remains anchored on US English forms regardless of UI locale —
@@ -131,4 +147,5 @@ export const isFormId = (value: unknown): value is FormId =>
131147 value === 'state_scanned' ||
132148 value === 'cerfa_12485' ||
133149 value === 'cerfa_14598' ||
150+ value === 'pre_anesthesia' ||
134151 value === 'custom'
0 commit comments