1import{u as N,e as S,h as C,z as P,r as s,j as t,A as T,B as M}from"./index-YNl15AGx.js";import{updatePaymentDetails as B}from"./parkingService-CMiK1hr_.js";const U=3e3,_=3e4;function L({lang:h="sv"}){var g;const{t:n}=N(h),{sessionId:o}=S(),a=C(),u=P(),y=(g=u.state)==null?void 0:g.shouldUpdatePaymentMethod,[v,r]=s.useState(!1),[w,l]=s.useState(""),[I,m]=s.useState(!1),p=s.useRef(null),x=s.useRef(null);function c(){clearInterval(p.current),clearTimeout(x.current)}function i(){r(!0),l(n("hint-code.GENERIC"))}function j(){c(),r(!1),l("")}function E(d){p.current=setInterval(async()=>{try{const e=await M(d);if(e.hintCode){const b="hint-code.".concat(e.hintCode),f=n(b);r(!0),l(!f||f===b?n("hint-code.GENERIC"):f)}e.personalIdentityNumber&&(c(),y?(await B({action:"PREFER_INVOICE",invoiceDeliveryType:"PAPER",updateOnRegistration:!1}),a("/account/settings")):a("/welcome-message"))}catch(e){c(),i()}},U)}async function R(){if(!o){i();return}m(!0);try{const e=await T(o&&o!=="new"?o:void 0);if(!(e!=null&&e.verificationUrl)){i();return}window.open(e.verificationUrl,"_self","noopener,noreferrer"),E(e.orderRef),x.current=setTimeout(()=>j(),_)}catch(d){i()}finally{m(!1)}}function k(){a("/verify-qr/".concat(o),{state:u.state})}return t.jsx("div",{className:"bg-[#fff] flex items-center justify-center px-4 py-12",children:t.jsx("div",{className:"w-full max-w-sm",children:t.jsxs("div",{className:"bg-white rounded-mobill-sm flex flex-col items-center text-center gap-4",style:{padding:"20px 30px",boxShadow:"0px 0px 5px rgba(0,0,0,0.1)",fontSize:14,lineHeight:"19px",color:"#333333"},children:[t.jsx("img",{src:"/assets/img/BankID_logo.svg",width:"125",alt:"BankID Logo"}),t.jsx("div",{children:t.jsx("h2",{style:{fontSize:14,lineHeight:"19px",fontWeight:"bold",margin:0},children:n("bankid-verification.title")})}),v&&t.jsx("div",{className:"w-full text-left rounded px-5 py-3",style:{background:"#d1ecf1",border:"1px solid #bee5eb",color:"#0c5460"},role:"alert",children:w}),t.jsx("button",{type:"button",onClick:R,disabled:I,className:"w-full inline-flex items-center justify-center\n bg-mobill-secondary text-white font-semibold px-6 py-3\n rounded-mobill-sm text-sm hover:bg-mobill-secondary/90\n focus:outline-none focus:ring-2 focus:ring-mobill-secondary focus:ring-offset-2\n disabled:opacity-60 transition-colors",children:n("bankid-verification.open-application")}),t.jsx("button",{type:"button",onClick:k,className:"w-full inline-flex items-center justify-center\n border border-mobill-secondary text-mobill-secondary font-semibold px-6 py-3\n rounded-mobill-sm text-sm hover:bg-mobill-secondary/10\n focus:outline-none focus:ring-2 focus:ring-mobill-secondary focus:ring-offset-2\n transition-colors",children:n("bankid-verification.open-application-different-device-button-text")})]})})})}export{L as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.