import './polyfills.server.mjs';
import{a as q}from"./chunk-PEXQ6CP4.mjs";import{E as v,Nb as h,_b as i,c as u,e as b,f as p,h as a,j as l,k as f,l as c,o,r as d,s as m}from"./chunk-I24PFG4Z.mjs";var n=class r extends q{constructor(t){super();this.http=t}faqs(){return this.http.get(`${i.server}/api/v1/faqs/${i.vendor}?order=asc`).pipe(a(t=>t.data),l(t=>(this.connectionError(t),p(()=>t))))}about(){return this.http.get(`${i.server}/api/v1/about-us/${i.vendor}`).pipe(a(t=>t.data),l(t=>(this.connectionError(t),p(()=>null))))}static \u0275fac=function(C){return new(C||r)(d(h))};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})};var s=class r{loadedAbout=v(!1);loadedFaqs=v(!1);aboutusContainer=new u(null);faqsContainer=new u([]);insert(e,t="about"){t==="about"?(this.aboutusContainer.next(e),e!==null&&this.loadedAbout.set(!0)):(this.faqsContainer.next(e),e.length>0&&this.loadedFaqs.set(!0))}get aboutus(){return this.aboutusContainer.asObservable()}get faqs(){return this.faqsContainer.asObservable()}static \u0275fac=function(t){return new(t||r)};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})};var A=class r{dataContainer=m(s);api=m(n);aboutus(){return this.dataContainer.aboutus.pipe(f(1),c(e=>e===null?this.api.about().pipe(a(t=>(this.dataContainer.insert(t,"about"),t))):b(e)))}faqs(){return this.dataContainer.faqs.pipe(f(1),c(e=>e.length>0?b(e):this.api.faqs().pipe(a(t=>(this.dataContainer.insert(t,"faqs"),t)))))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})};export{A as a};
