import{aT as E,j as t,aR as L}from"./react-vendor-xYZnmIII.js";import{B as z}from"./blog-card-1-62_VNbIC.js";import{T as F}from"./table-footer-Dfs_f5Wf.js";import{g as R}from"./route-D0xh7FtZ.js";import{c as A}from"./ui-components-CQM92IK3.js";import D from"./layout-xAGyhcQB.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./use-lang-Dg6I_Fym.js";import"./interactive-vendor-B1OgcAgP.js";import"./use-screen-XQDPI5EM.js";import"./landing-layout-hWcnW4wD.js";import"./index-J6afNYNJ.js";import"./app-logo-BQGZ7CFC.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./use-auth-l-ShkEGs.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./profile-toggle-CTDQohVW.js";import"./index.browser-OxPLOBIU.js";import"./blog-filter-CxtS2L_S.js";import"./search-input-BXgStIKS.js";import"./debounce-CWHP_ANh.js";const H=e=>{var u,y,f,h,b,w,_,v,B,I,T,P;const{url:m}=E(),{blogs:c,category:d,system:i,translate:N}=e,{frontend:a}=N,l=R(m),j=m,r=((u=i==null?void 0:i.fields)==null?void 0:u.name)||a.default_site_name,O=((y=i==null?void 0:i.fields)==null?void 0:y.author)||a.default_author,p=((f=e.blogs)==null?void 0:f.total)||0,$=typeof window!="undefined"?window.location.origin:m.split("/").slice(0,3).join("/"),s=a.all_blogs,n=a.blog_page_description.replace(":total",p.toString()),S=a.blog_page_keywords,x=a.latest_blog_posts,k=`${s} | ${r}`,g=((w=(b=(h=e.blogs)==null?void 0:h.data)==null?void 0:b[0])==null?void 0:w.thumbnail)||((B=(v=(_=e.blogs)==null?void 0:_.data)==null?void 0:v[0])==null?void 0:B.banner)||""||"/assets/images/blank-image.jpg";return t.jsxs(t.Fragment,{children:[t.jsxs(L,{children:[t.jsx("title",{children:k}),t.jsx("meta",{name:"description",content:n}),t.jsx("meta",{name:"keywords",content:S}),t.jsx("meta",{name:"author",content:O}),t.jsx("meta",{property:"og:type",content:"website"}),t.jsx("meta",{property:"og:url",content:j}),t.jsx("meta",{property:"og:title",content:x}),t.jsx("meta",{property:"og:description",content:n}),t.jsx("meta",{property:"og:site_name",content:r}),t.jsx("meta",{property:"og:image",content:g}),t.jsx("meta",{property:"og:image:width",content:"1200"}),t.jsx("meta",{property:"og:image:height",content:"630"}),t.jsx("meta",{property:"og:image:alt",content:`${s} - ${a.blog_list_alt}`}),t.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),t.jsx("meta",{name:"twitter:title",content:x}),t.jsx("meta",{name:"twitter:description",content:n}),t.jsx("meta",{name:"twitter:image",content:g}),t.jsx("meta",{name:"blogs:total",content:p.toString()}),t.jsx("meta",{name:"blogs:page",content:(((I=e.blogs)==null?void 0:I.current_page)||1).toString()}),t.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:s,description:n,url:j,image:g,provider:{"@type":"Organization",name:r,url:$},mainEntity:{"@type":"ItemList",name:`${s} Collection`,description:n,numberOfItems:p,itemListElement:((P=(T=e.blogs)==null?void 0:T.data)==null?void 0:P.slice(0,10).map((o,C)=>({"@type":"BlogPosting",position:C+1,name:o.title,headline:o.title,description:(o.description||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim(),image:o.thumbnail||o.banner||"",provider:{"@type":"Organization",name:r}})).filter(Boolean))||[]}})})]}),t.jsx("div",{className:A(l.view&&l.view==="list"?"space-y-7":"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3"),children:c.data.map(o=>t.jsx(z,{blog:o,viewType:l.view},o.id))}),t.jsx(F,{className:"mt-6 p-5 sm:p-7",routeName:"blogs.guest",paginationInfo:c,routeParams:{category:d?d.slug:"all"}})]})};H.layout=e=>t.jsx(D,{children:e});export{H as default};
