(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[65638],{27108:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/logg-inn",function(){return r(34878)}])},63651:function(e,s,r){"use strict";r.d(s,{I:function(){return a}});var t=r(52676),l=r(60289);let a=e=>{var s;let{type:r,name:a,label:n,disabled:o,required:i,placeholder:d,hideLabel:c,register:u,errors:m,value:x,onChange:b,onKeyDown:p,size:h,defaultValue:g,className:f}=e,j=(0,l.cn)("w-full border-dark/20 !outline-none transition-colors hover:border-dark/50 focus:border-dark/100 focus:ring-dark disabled:bg-dark/5 disabled:text-muted disabled:hover:border-dark/20","lg"===h?"h-14 px-5 text-lg sm:h-16 sm:px-6":"h-12 px-4 sm:h-14 sm:px-5",f);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("label",{children:[(0,t.jsxs)("span",{className:(0,l.cn)(c?"sr-only":"mb-1.5 block w-full text-left text-sm font-semibold"),children:[n,i&&(0,t.jsx)("span",{className:"text-danger",children:"*"})]}),(0,t.jsx)("input",{type:r,disabled:o,placeholder:d,value:x,...u?u(a):{},onChange:b,onKeyDown:p,defaultValue:g,className:j})]}),(null==m?void 0:m[a])&&(0,t.jsx)("p",{className:"bg-danger/10 px-2 py-1 text-xs text-danger",children:null===(s=m[a])||void 0===s?void 0:s.message})]})}},52592:function(e,s,r){"use strict";r.d(s,{W:function(){return d}});var t=r(52676),l=r(60399),a=r(4998),n=r(74355),o=r(28097),i=r(60289);let d=e=>{let{whiteDomainBackground:s}=(0,o.wP)(),{heading:r,description:d,content:c,children:u}=e;return(0,t.jsx)(l.W,{className:"mt-8 mb-20",children:(0,t.jsxs)("div",{className:"mx-auto max-w-xl",children:[(0,t.jsxs)("div",{className:"mb-8 text-center md:mb-10",children:[(0,t.jsx)(n.X,{level:1,size:2,children:r}),d&&(0,t.jsx)("p",{className:"mt-4 md:mt-7",children:d}),(0,t.jsx)(a.Y,{content:c,className:"mt-4 md:mt-7"})]}),(0,t.jsx)("div",{className:(0,i.cn)("mx-auto max-w-xl p-6 sm:p-10",s?"bg-dark/5":"bg-white "),children:u})]})})}},9981:function(e,s,r){"use strict";r.d(s,{U:function(){return d}});var t=r(52676),l=r(63651),a=r(44212),n=r(7049),o=r(26721),i=r(75271);let d=e=>{let{callbackUrl:s,buttonText:r}=e,d=(0,n.o)("error"),[c,u]=(0,i.useState)(""),[m,x]=(0,i.useState)(""),[b,p]=(0,i.useState)(!1),[h,g]=(0,i.useState)("");return(0,i.useEffect)(()=>{d?g(d):g("")},[d]),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p(!0),(0,o.signIn)("sanity-login",{email:c.toLowerCase(),password:m,callbackUrl:s})},className:"flex flex-col gap-y-3",children:[(0,t.jsx)(l.I,{type:"email",name:"email",label:"E-postadresse",placeholder:"E-postadresse",hideLabel:!0,value:c,onChange:e=>u(e.target.value),size:"lg"}),(0,t.jsx)(l.I,{type:"password",name:"password",label:"Passord",placeholder:"Passord",hideLabel:!0,value:m,onChange:e=>x(e.target.value),size:"lg"}),(0,t.jsx)(a.z,{size:"xl",linkType:"button",buttonType:"submit",className:"sm:text-lg",disabled:b,children:b?"Logger inn...":null!=r?r:"Logg inn"}),h&&(0,t.jsx)("p",{className:"bg-danger/10 px-4 py-3 text-sm text-danger",children:h})]})}},34878:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return c},default:function(){return u}});var t=r(52676),l=r(52592),a=r(9981),n=r(971),o=r(89117),i=r(29285);let d=e=>{let{data:s}=e,{title:r,intro:d,crmSettings:c,subscriptionTypesPageSlug:u}=s;console.log(s);let{subscriptionLabels:m}=c,{prevPath:x}=(0,o.h)(),b=x===(0,i.i)("registrationPage")?(0,i.i)("registrationPage"):(0,i.i)("welcomePage");return(0,t.jsxs)(l.W,{heading:r,content:d,children:[(0,t.jsx)(a.U,{callbackUrl:b}),(0,t.jsxs)("div",{className:"mt-8 flex flex-col gap-y-4 text-center text-sm",children:[(0,t.jsxs)("p",{children:["Har du glemt passordet ditt?",(0,t.jsx)("br",{}),(0,t.jsx)(n.S,{linkType:"internal",type:"resetPasswordPage",className:"border-b border-dark/50 font-semibold transition-colors hover:border-dark/100",children:"Tilbakestill passordet her"})]}),(0,t.jsxs)("p",{children:["Har du en bruker, men ikke et passord?",(0,t.jsx)("br",{}),(0,t.jsx)(n.S,{linkType:"internal",type:"resetPasswordPage",className:"border-b border-dark/50 font-semibold transition-colors hover:border-dark/100",children:"F\xe5 lenke for \xe5 sette passord her"})]}),(0,t.jsxs)("p",{children:["Er du ikke ",m.subscriber.toLowerCase()," enda?",(0,t.jsx)("br",{}),(0,t.jsxs)(n.S,{linkType:"internal",type:"page",link:null!=u?u:"",className:"border-b border-dark/50 font-semibold transition-colors hover:border-dark/100",children:["Velg ",m.subscription.toLowerCase()," og bli medlem her"]})]})]})]})};var c=!0,u=e=>(0,t.jsx)(d,{...e})}},function(e){e.O(0,[92888,49774,40179],function(){return e(e.s=27108)}),_N_E=e.O()}]);