1import{K as F,a8 as Q,a9 as k,J as P,M as S,j as r,S as p,g as h,a_ as u,aZ as I,aW as L,X as B,a4 as $,bB as v,r as l,a5 as D,bC as E,bD as U,b4 as N}from"./index-gtgUaXfW.js";import{S as R}from"./PostilLayout-D8-GDG8d.js";import{u as G}from"./useUmbracoLanguageValidator-CVUMdP2C.js";import{m as T}from"./mapBackground-BqBFh_pF.js";import{k as V,l as K,P as O}from"./contactUsEvents-aXooGoe7.js";import{R as W,L as _}from"./PostilAccordionItem-8UcPdmPJ.js";import"./languageValidationPopupContext-nkKYP3VV.js";import"./ChevronLeft16-BpjdGQD0.js";import"./PostilFullWidth--yOiavgC.js";import"./gtagEvent-h1GmBv28.js";import"./resolveModule-Cy_Ao8FN.js";import"./Collapse-BxtcnwXx.js";const H=e=>({...e,header:{...e.header,background:T(e.header.background),breadcrumbItems:e.header.breadcrumbItems.map(t=>({label:t.title??"",href:t.url,target:t.target?t.target:void 0}))}}),J=()=>{const e=F(),t=Q(),a=["faqPage",e],o=k({queryKey:a,queryFn:async()=>{const i=t.getQueryData(a);if(i)return i;const{data:c}=await P.get(`${S}/FaqPage${e}`),d=H(c);return t.setQueryData(a,d),d}});return G(o.data?.languages),o},x=(e,t)=>`faq-${e}-${t}`,M=({data:e,categoryIndex:t,expandedValue:a,onChange:o})=>r.jsxs(p,{component:"section",width:"100%",gap:u(16),children:[r.jsxs(p,{direction:"row",alignItems:"center",gap:u(8),children:[e.icon&&r.jsx(h,{component:"img",src:e.icon,alt:"","aria-hidden":"true",sx:{width:u(32),height:u(32),flexShrink:0}}),r.jsx(I,{variant:"D1",fontWeight:"Bold",color:"text.primary",component:"h2",children:e.categoryName})]}),r.jsx(h,{sx:{width:{mobile:"100%",laptop:u(754)}},children:r.jsx(W,{value:a,onChange:o,"aria-label":e.categoryName,children:e.faq.map((i,c)=>r.jsx(_,{value:x(t,c),question:i.question,answer:i.answer},x(t,c)))})})]}),ce=()=>{const e=L().direction,{lang:t}=B(),{data:a,isLoading:o,error:i}=J(),c=$();v({background:N.white});const d=V(),q=K(),[b,y]=l.useState(null);l.useEffect(()=>{D(o),!o&&!a&&i&&c("/",{replace:!0})},[a,o,i,c]);const m=l.useRef(!1);l.useEffect(()=>{m.current||a&&(d(),m.current=!0)},[a,d]);const j=n=>{if(!(!n||!a))for(let s=0;s<a.topicGroups.length;s++){const g=a.topicGroups[s],f=g.faq.findIndex((X,w)=>`faq-${s}-${w}`===n);if(f!==-1)return g.faq[f].question}},C=n=>{y(n);const s=j(n);n&&s&&q(s)};return r.jsx(E,{direction:e,linkConfig:{enableRouting:!0,blobBaseUrl:"https://cdn-mypostpublic.israelpost.co.il",transformUrl:U,lang:t},includeCssBaseline:!1,children:a&&r.jsx(R,{children:r.jsxs(p,{width:"100%",alignContent:"center",alignItems:"center",gap:u(48),mb:u(48),children:[r.jsx(O,{data:a.header}),a.topicGroups.map((n,s)=>r.jsx(M,{categoryIndex:s,data:n,expandedValue:b,onChange:C},n.categoryName))]})})})};export{ce as Faq}; 2//# sourceMappingURL=index-CnzJ5PKS.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.