Loading
function(l,t,d){d.d(t,{Consent:()=>p});var i=d(31144),c=d(248702),e=d(899656),a=d(458741),s=d(727571),Z=d(542075),n=d(321724),b=d(242003),m=d(967325),o=d(868282),u=d(47418),h=d(901510),W=d(778186),G=({config:l,manager:t,onFinish:d,onError:a})=>{let{t:o}=(0,i.n)(),G=(0,c.l)(null),[p,N]=(0,e.o)(()=>{if(t)return t;if(!l)throw Error("Consent config is required");return(0,W.w)({config:l})},{manageLifecycle:!t});(0,c._)(()=>{"display"===p.status&&G.current?.focus()},[p.status]);let M="checkboxes"in p?p.checkboxes:void 0,X=(0,c.d)(()=>(0,h.n)(M?.map(l=>l.required)??[]),[M]);return"finished"===p.status?(d?.(),null):"error"===p.status?(a?.(p.error),null):"idle"===p.status||"loading"===p.status?(0,c.v)(n.t,{hideText:!0}):(0,c.v)(s.t,{className:"IncodeConsentPage",hideFooterBranding:!0,hideHeader:!0,children:(0,c.v)("div",{class:"IncodeConsentContent",children:[(0,c.v)("div",{class:"IncodeConsentBody",children:[(0,c.v)(Z.n,{ref:G,className:"IncodeConsentTitle",tabIndex:-1,children:p.title}),(0,c.v)(u.t,{content:p.richText,class:"IncodeRichText"}),(0,c.v)("div",{class:"IncodeConsentCheckboxList",role:"group","aria-label":o("biometricConsent.consentOptions"),children:p.checkboxes.map(l=>{let t=(0,h.t)(X,l.required),d=t?o(`forms.label.${t}`):void 0;return(0,c.v)(m.t,{id:`consent-checkbox-${l.id}`,class:"IncodeConsentCheckbox",size:"s",checked:l.checked,required:l.required,labelHint:d,onChange:()=>N.toggleCheckbox(l.id),label:(0,c.v)("span",{class:"IncodeConsentCheckboxLabel",onClick:l=>{l.target.closest("a")&&l.stopPropagation()},children:(0,c.v)(u.t,{content:l.label,class:"IncodeRichText",disallowedTags:["img"]})})},l.id)})})]}),(0,c.v)(b.t,{"data-testid":"consent-submit",onClick:()=>N.submit(),disabled:!p.canSubmit,isLoading:"submitting"===p.status,children:o("biometricConsent.button.continue")})]})},"ready")},p=({config:l,manager:t,onFinish:d,onError:i})=>(0,c.v)(a.t,{children:l?(0,c.v)(G,{config:l,manager:t,onFinish:d,onError:i}):null});(0,o.t)(p,"incode-consent")}