1import{a as Y}from"./chunk-GI5IPMNP.js";import"./chunk-RCESIP56.js";import{a as Z}from"./chunk-H5BSCQRR.js";import{a as W}from"./chunk-MGODF7PL.js";import"./chunk-XICVMRO5.js";import{a as X}from"./chunk-JPYFYTHS.js";import"./chunk-TDAOCRQD.js";import{a as Q}from"./chunk-LYLFRCIE.js";import"./chunk-QPSWTSIM.js";import{a as at}from"./chunk-3ZT7DYNP.js";import{l as $,n as G,o as K}from"./chunk-LJVWLVVB.js";import"./chunk-DP76YC53.js";import{m as U}from"./chunk-SW2PCWOQ.js";import{$b as q,Cc as J,Db as d,Dc as f,Ec as C,Ga as M,Ha as O,Ia as V,Jb as p,Qb as u,Rb as k,Tb as A,Ub as j,Vb as l,Wb as s,Xb as H,a as R,b as D,e as ot,fc as N,gc as c,ob as r,qc as m,sc as z,ta as g,xa as E}from"./chunk-FFQH2GOQ.js";var tt=ot(at());var et=i=>["/blog/category",i],it=()=>["/blog"];function rt(i,a){if(i&1&&(l(0,"div",1)(1,"a",6),m(2,"View All Blogs"),s()()),i&2){let n=c();r(),p("routerLink",(n.options==null?null:n.options.post_by)==="category"&&n.categorySlug?C(1,et,n.categorySlug):f(3,it))}}function lt(i,a){if(i&1&&(l(0,"div",3),H(1,"app-blog-card",7),s()),i&2){let n=a.$implicit,o=c();p("ngClass",o.isBottomSection?"col-12 col-sm-6 col-lg-3":"col-12"),r(),p("blog",n)("options",o.options)}}function st(i,a){if(i&1){let n=q();l(0,"div",4)(1,"app-custom-paginator",8),N("pageChange",function(e){O(n);let t=c();return V(t.pageChanged(e))}),s()()}if(i&2){let n=c();r(),p("currentPage",n.paginationConfig.currentPage)("totalItems",n.paginationConfig.totalItems)("itemsPerPage",n.paginationConfig.itemsPerPage)}}function gt(i,a){if(i&1&&(l(0,"div",5)(1,"a",6),m(2,"View All Blogs"),s()()),i&2){let n=c();r(),p("routerLink",(n.options==null?null:n.options.post_by)==="category"&&n.categorySlug?C(1,et,n.categorySlug):f(3,it))}}var _t=(()=>{let a=class a{constructor(){this.isBottomSection=!1,this.loaders={fetching:!0},this.paginationConfig={itemsPerPage:5,currentPage:1,totalItems:0},this.isListingPage=!1,this.blogService=g(Z),this.route=g($),this.router=g(G),this.pageChangeHandlerService=g(W),this.pageBuilderService=g(Q)}ngOnInit(){this.isListingPage=this.pageBuilderService.getCurrentSettings.pageLayoutType==="listing-page",this.route.queryParams.subscribe(o=>{var e;this.paginationConfig.currentPage=((e=this.options)==null?void 0:e.mode)==="advanced"&&!this.isListingPage&&+o.page||1,this.getBlogs()})}ngOnChanges(o){(0,tt.get)(o,"options.currentValue",null)&&(this.paginationConfig.currentPage=1,this.getBlogs())}getBlogs(){let o=D(R({},this.options),{page:this.paginationConfig.currentPage||1});this.blogService.getRecentBlogs(o).subscribe({next:e=>{var t,h,y,b,v,_,P,S,B,w,L,x,I,T;this.blogData=(t=e==null?void 0:e.body)==null?void 0:t.data.blogs,this.categorySlug=((h=this.options)==null?void 0:h.category_url)||((_=(v=(b=(y=this.blogData)==null?void 0:y[0])==null?void 0:b.blog_categories)==null?void 0:v.find(nt=>{var F;return nt.uuid===((F=this.options)==null?void 0:F.category)}))==null?void 0:_.url),this.paginationConfig.totalItems=(w=(B=(S=(P=e==null?void 0:e.body)==null?void 0:P.data.meta)==null?void 0:S.pagination)==null?void 0:B.total)!=null?w:0,this.paginationConfig.itemsPerPage=(T=(I=(x=(L=e==null?void 0:e.body)==null?void 0:L.data.meta)==null?void 0:x.pagination)==null?void 0:I.per_page)!=null?T:5}})}pageChanged(o){this.router.navigate([],{queryParams:{page:o},queryParamsHandling:"merge"}),this.pageChangeHandlerService.notifyPageChange()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=E({type:a,selectors:[["app-sidebar-blog-list"]],inputs:{options:"options",isBottomSection:"isBottomSection"},standalone:!0,features:[M,J],decls:8,vars:4,consts:[[1,"fw-semibold","fs-20","mb-3"],[1,"w-100","d-flex","justify-content-center","mb-3","content-container"],[1,"row","gy-4"],[3,"ngClass"],[1,"d-flex","justify-content-center","mt-3"],[1,"w-100","d-flex","justify-content-center","mb-1","mt-3","content-container"],[1,"view-all","btn","btn-primary",3,"routerLink"],[3,"blog","options"],[3,"pageChange","currentPage","totalItems","itemsPerPage"]],template:function(e,t){e&1&&(l(0,"h4",0),m(1),s(),d(2,rt,3,4,"div",1),l(3,"div",2),A(4,lt,2,3,"div",3,k),s(),d(6,st,2,3,"div",4)(7,gt,3,4,"div",5)),e&2&&(r(),z(" ",(t.options==null?null:t.options.title)||((t.options==null?null:t.options.post_by)==="category"?"Recent Blog Post By Categories":(t.options==null?null:t.options.post_by)==="tag"?"Recent Blog Post By Tag":"Recent Blog Posts"),"\n"),r(),u(t.options!=null&&t.options.view_more&&(t.options==null?null:t.options.position)==="top"?2:-1),r(2),j(t.blogData),r(2),u(t.paginationConfig.totalItems>0&&(t.options==null?null:t.options.mode)==="advanced"&&!t.isListingPage?6:-1),r(),u(t.options!=null&&t.options.view_more&&(t.options==null?null:t.options.position)==="bottom"?7:-1))},dependencies:[Y,U,K,X],styles:[".content-container[_ngcontent-%COMP%]{container:content-container/inline-size;display:flex}.view-all[_ngcontent-%COMP%]{width:100%}@container content-container (min-width: 400px){.view-all[_ngcontent-%COMP%]{width:fit-content}}\n/*# sourceMappingURL=sidebar-blog-list.component-SA5DAJDB.css.map */"]});let i=a;return i})();export{_t as SidebarBlogListComponent}; 2//# sourceMappingURL=chunk-5JCZALNR.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.