1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9473],{50173:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSG:()=>y,default:()=>j});var i=n(33736),r=n(91844),l=n(51882),a=n(95466),s=n(7119),o=n(14094),c=n(7021),d=n(98976),x=n(10131),p=n(24548),m=n(31201),g=n(38917);let u=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M11.25 3.5L2.75 12M2.75 12L11.25 20.5M2.75 12H21.5",stroke:"#F14157",strokeLinecap:"round"})});var h=n(79421),f=n(83234),y=!0;let j=e=>{let{navbar:t,footer:n,radioSchedules:y}=e,[j,v]=(0,r.useState)([]),[w,S]=(0,r.useState)([]),[k,A]=(0,r.useState)("Sj\xe1 allt"),_=[{id:1,name:"Fars\xedmi",icon:(0,i.jsx)(o.A,{}),slug:"farsimi",category:"Voda_Farsimi"},{id:2,name:"Internet",icon:(0,i.jsx)(c.A,{}),slug:"internet",category:"Vodaf_Internet"},{id:3,name:"Sj\xf3nvarp",icon:(0,i.jsx)(d.A,{}),slug:"sjonvarp",category:"Sj_nvarp"},{id:4,name:"Reikningar",icon:(0,i.jsx)(x.A,{}),slug:"reikningar",category:"Reikningar"},{id:5,name:"Heimas\xedmi",icon:(0,i.jsx)(p.A,{}),slug:"heimasimi",category:"Voda_Heimasimi"},{id:6,name:"Stillingar",icon:(0,i.jsx)(g.A,{}),slug:"stillingar",category:"Stillingar"},{id:7,name:"Fyrirt\xe6ki",icon:(0,i.jsx)(m.A,{}),slug:"fyrirtaeki",category:"Fyrirt_ki"}],C=(0,a.useRouter)(),{slug:F,id:b}=C.query,E=_.find(e=>e.slug===F),N=(0,r.useRef)({});(0,r.useEffect)(()=>{if("string"==typeof b&&N.current&&N.current[b]){var e;null==(e=N.current[b])||e.scrollIntoView({behavior:"smooth",block:"start"})}},[b,j]),(0,r.useEffect)(()=>{(async()=>{if(null==E?void 0:E.category)try{let e={Authorization:"Basic ".concat("cHJvZHZvZGF3ZWI6UHJvZFZvZGFXZWI=")},t="".concat("https://api.syn.is/experience/vodafone-web/services/data/v59.0/support/knowledge-articles?categories=%7B%22External_Articles%22%3A%22").concat(E.category,"%22%7D&pageNumber="),n=[],i=!0,r=1;for(;i;){let l=await fetch("".concat(t).concat(r),{headers:e}),a=await l.json();Array.isArray(a.articles)&&n.push(...a.articles),a.nextPageUrl||(i=!1),r++}let l=(e=>{let t=[];return e.forEach(e=>{let n=e.categoryGroups[0].selectedCategories[0].categoryLabel;for(let i=0;i<t.length;i++)if(t[i].name===n)return void t[i].items.push(e);t.push({name:n,items:[e]})}),t})(n);v(l),S(l)}catch(e){f.t.error("Error fetching data:",e)}})()},[null==E?void 0:E.category]);let I=e=>{if(A(e),"Sj\xe1 allt"===e)return void S(j);S(j.filter(t=>t.name===e))},H=(null==E?void 0:E.name)?"S\xfdn | A\xf0sto\xf0 | ".concat(E.name):"A\xf0sto\xf0",B={title:H,description:"A\xf0sto\xf0",url:"https://www.syn.is/frettir/".concat(null==E?void 0:E.name),keywords:"a\xf0sto\xf0,spurt og svara\xf0,hj\xe1lp,spurningar"};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(s.A,{title:H,metaTags:B,navbar:t,footer:n,radioSchedules:y,children:(0,i.jsxs)("div",{className:"col-span-full mt-80 sm:mx-4",style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginBottom:"50px",marginTop:"100px",width:"1016px",maxWidth:"100vw",maxHeight:"496px",justifyContent:"center",alignItems:"start"},className:"px-12 sm:px-0",children:[(0,i.jsxs)("div",{onClick:()=>void C.push("/adstod"),style:{marginBottom:"4rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},children:[(0,i.jsx)(u,{}),(0,i.jsx)("div",{style:{marginLeft:"8px",color:"#F14157",fontSize:"18px",fontStyle:"normal",fontWeight:"700",lineHeight:"normal"},children:(0,i.jsx)("p",{children:"Allir flokkar"})})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignContent:"center",marginBottom:"24px"},children:[(0,i.jsx)("div",{style:{marginRight:"8px",alignContent:"center"},children:null==E?void 0:E.icon}),(0,i.jsx)("div",{children:(0,i.jsx)("h1",{style:{fontSize:"40px",fontStyle:"normal",fontWeight:"700",lineHeight:"normal",color:"#4A4D4E"},children:null==E?void 0:E.name})})]}),(0,i.jsx)("div",{style:{display:"flex",flexWrap:"wrap"},children:j.length>0?(0,i.jsxs)("div",{className:"flex flex-wrap gap-12",children:[(0,i.jsx)("div",{onClick:()=>I("Sj\xe1 allt"),style:{color:"Sj\xe1 allt"===k?"white":"#F14157",fontSize:"16px",fontStyle:"normal",fontWeight:"700",padding:"8px 16px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",borderRadius:"40px",cursor:"pointer",border:"1px solid #F14157",marginBottom:"10px",backgroundColor:"Sj\xe1 allt"===k?"#F14157":"transparent"},children:(0,i.jsx)("p",{children:"Sj\xe1 allt"})}),j.map(e=>(0,i.jsx)("div",{children:(0,i.jsx)("h3",{onClick:()=>I(e.name),style:{color:k===e.name?"white":"#F14157",fontSize:"16px",fontStyle:"normal",fontWeight:"700",padding:"8px 16px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",borderRadius:"40px",cursor:"pointer",marginBottom:"10px",border:"1px solid #F14157",background:k===e.name?"#F14157":"transparent"},children:e.name})},e.name))]}):(0,i.jsx)(i.Fragment,{})})]}),(0,i.jsx)("div",{style:{width:"100%",backgroundColor:"white",display:"flex",justifyContent:"center"},children:w.length>0?(0,i.jsx)("div",{style:{width:"808px",paddingBottom:"4rem"},children:w.map(e=>(0,i.jsxs)("div",{className:"px-12",children:[(0,i.jsx)("h3",{style:{fontSize:"32px",fontStyle:"normal",fontWeight:"700",lineHeight:"normal",marginTop:"56px",color:"#4A4D4E"},children:e.name}),(0,i.jsx)("ul",{children:e.items.map(e=>{var t;return(0,i.jsx)("li",{ref:t=>{t&&(N.current[e.id]=t)},children:(0,i.jsx)(l.A,{ticketInfo:e,ticketOpenURL:(t=e.id,!!b&&b===t)})},e.id)})})]},e.name))}):(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"flex items-center justify-center",children:(0,i.jsx)(h.A,{})})})})]})})})}},70717:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/adstod/[slug]",function(){return n(50173)}])}},e=>{e.O(0,[6371,27931,95611,92043,12685,90636,46593,38792],()=>e(e.s=70717)),_N_E=e.O()}]); 2//# sourceMappingURL=[slug]-3ddb2121e1640f88.js.map
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.