1import{j as e}from"./jsx-runtime-C-_spy54.js";import{c as b}from"./clsx-B-dksMZM.js";import{r as i,L as m}from"./chunk-OB3PAWPO-CrLP7qWp.js";import{D as p}from"./DateUtils-B-gevZQm.js";import{t as j}from"./blogTaxonomy-Mcqw3L2d.js";function F({blogPath:L,items:d,withCoverImage:x,withAuthorName:N=!0,withAuthorAvatar:y=!0,withDate:u=!0,mode:c="default",heading:S,subheading:C}){const[g,R]=i.useState(""),[l,v]=i.useState("all");function w(r){return/^https?:\/\//.test(r.slug)?r.slug:L+"/"+r.slug}function A(r){return/^https?:\/\//.test(r.slug)}const k=i.useMemo(()=>{const r=d.map(t=>t.category?.name).filter(t=>!!t);return Array.from(new Set(r)).sort((t,o)=>t.localeCompare(o))},[d]),a=i.useMemo(()=>{const r=g.trim().toLowerCase();return d.filter(t=>{if(!(l==="all"||t.category?.name===l))return!1;if(!r)return!0;const M=t.title.toLowerCase(),P=t.description.toLowerCase(),E=t.tags.map(f=>f.tag.name.toLowerCase());return M.includes(r)||P.includes(r)||E.some(f=>f.includes(r))})},[d,g,l]),s=a[0],I=a.slice(1,3),n=a.slice(c==="landing"?3:1);function h({item:r,label:t}){const o="text-primary text-sm font-semibold hover:underline";return A(r)?e.jsx("a",{href:w(r),target:"_blank",rel:"noreferrer",className:o,children:t}):e.jsx(m,{to:w(r),className:o,children:t})}return e.jsx("section",{className:"body-font pb-24",children:e.jsxs("div",{className:"mx-auto w-full max-w-7xl px-5",children:[c==="landing"&&e.jsxs("div",{className:"border-border/70 relative mb-10 overflow-hidden rounded-3xl border bg-gradient-to-br from-slate-950 via-slate-900 to-slate-800 px-6 py-12 text-slate-100 md:px-10",children:[e.jsx("div",{className:"pointer-events-none absolute -top-10 -left-10 h-56 w-56 rounded-full bg-cyan-400/20 blur-3xl"}),e.jsx("div",{className:"pointer-events-none absolute -right-10 -bottom-16 h-56 w-56 rounded-full bg-blue-500/20 blur-3xl"}),e.jsx("div",{className:"relative",children:e.jsxs("div",{children:[e.jsx("p",{className:"mb-3 text-xs font-semibold tracking-[0.24em] text-cyan-200/90 uppercase",children:"InterScribe Journal"}),e.jsx("h1",{className:"max-w-3xl text-3xl leading-tight font-semibold md:text-5xl",children:S||"Insights on live interpretation, events, and language access"}),e.jsx("p",{className:"mt-4 max-w-2xl text-sm text-slate-300 md:text-base",children:C||"Playbooks, benchmarks, and field notes from teams running multilingual experiences at scale."})]})})]}),e.jsxs("div",{className:"border-border/60 bg-card/70 mb-8 space-y-4 rounded-2xl border p-4 shadow-sm backdrop-blur-sm md:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[e.jsx("label",{htmlFor:"blog-search",className:"sr-only",children:"Search blog posts"}),e.jsx("input",{id:"blog-search",type:"search",value:g,onChange:r=>R(r.target.value),placeholder:"Search by topic, keyword, or tag...",className:"border-border bg-background ring-offset-background focus:ring-ring w-full rounded-lg border px-4 py-2.5 text-sm transition outline-none focus:ring-2 md:max-w-xl"}),e.jsxs("div",{className:"text-muted-foreground text-sm",children:[a.length," ",a.length===1?"article":"articles"]})]}),k.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>v("all"),className:b("rounded-full border px-3 py-1 text-xs font-medium transition",l==="all"?"border-primary bg-primary text-primary-foreground":"border-border bg-background text-muted-foreground hover:text-foreground"),children:"All"}),k.map(r=>e.jsx("button",{type:"button",onClick:()=>v(r),className:b("rounded-full border px-3 py-1 text-xs font-medium transition",l===r?"border-primary bg-primary text-primary-foreground":"border-border bg-background text-muted-foreground hover:text-foreground"),children:r},r))]})]}),s&&c==="landing"&&e.jsxs("div",{className:"mb-10",children:[e.jsx("div",{className:"mb-4 flex items-center justify-between",children:e.jsx("h2",{className:"text-lg font-semibold tracking-tight md:text-xl",children:"Spotlight"})}),e.jsxs("div",{className:"grid gap-5 lg:grid-cols-12",children:[e.jsxs("article",{className:"border-border/60 bg-card/60 overflow-hidden rounded-2xl border lg:col-span-8",children:[x&&s.image&&e.jsx("img",{className:"h-64 w-full object-cover object-center md:h-80",src:s.image,alt:s.title}),e.jsxs("div",{className:"p-6 md:p-8",children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-3 text-xs font-medium tracking-wider up
1percase",children:[s.category?.name?e.jsx(m,{to:`/blog/categories/${j(s.category.name)}`,className:"text-primary underline-offset-2 hover:underline",children:s.category.name}):null,u?e.jsx("span",{className:"text-muted-foreground",children:p.dateAgo(s.date)}):null]}),e.jsx("h3",{className:"text-2xl font-semibold md:text-3xl",children:s.title}),e.jsx("p",{className:"text-muted-foreground mt-3 leading-relaxed",children:s.description}),N&&s.author&&e.jsxs("div",{className:"text-muted-foreground mt-5 flex items-center gap-2 text-sm",children:[y&&s.author.avatar?e.jsx("img",{className:"h-7 w-7 rounded-full object-cover",src:s.author.avatar,alt:s.author.firstName}):null,e.jsxs("span",{children:[s.author.firstName," ",s.author.lastName]})]}),e.jsx("div",{className:"mt-5",children:e.jsx(h,{item:s,label:"Read feature"})})]})]}),e.jsx("div",{className:"space-y-5 lg:col-span-4",children:I.map(r=>e.jsxs("article",{className:"border-border/60 bg-card/60 overflow-hidden rounded-2xl border",children:[x&&r.image&&e.jsx("img",{className:"h-36 w-full object-cover object-center",src:r.image,alt:r.title}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2 text-xs font-medium tracking-widest uppercase",children:[r.category?.name?e.jsx(m,{to:`/blog/categories/${j(r.category.name)}`,className:"text-primary underline-offset-2 hover:underline",children:r.category.name}):e.jsx("span",{}),u?e.jsx("span",{className:"text-muted-foreground",children:p.dateAgo(r.date)}):null]}),e.jsx("h4",{className:"mb-2 text-lg leading-tight font-semibold",children:r.title}),e.jsx("p",{className:"text-muted-foreground mb-3 line-clamp-2 text-sm",children:r.description}),e.jsx(h,{item:r,label:"Read article"})]})]},r.slug))})]})]}),n.length>0&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight md:text-xl",children:c==="landing"?"Latest Articles":"Articles"}),e.jsx("div",{className:b("grid gap-5",n.length===1&&"max-w-md lg:grid-cols-1",n.length===2&&"max-w-4xl lg:grid-cols-2",n.length>2&&"md:grid-cols-2 lg:max-w-none lg:grid-cols-3"),children:n.map(r=>e.jsxs("article",{className:"border-border/60 bg-card/50 flex h-full flex-col overflow-hidden rounded-xl border",children:[x&&r.image&&e.jsx("img",{className:"h-44 w-full object-cover object-center",src:r.image,alt:r.title}),e.jsxs("div",{className:"flex h-full flex-col p-5",children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2 text-xs font-medium tracking-widest uppercase",children:[r.category?.name?e.jsx(m,{to:`/blog/categories/${j(r.category.name)}`,className:"text-primary underline-offset-2 hover:underline",children:r.category.name}):e.jsx("span",{}),u?e.jsx("span",{className:"text-muted-foreground",children:p.dateAgo(r.date)}):null]}),e.jsx("h3",{className:"text-foreground mb-2 text-lg font-semibold",children:r.title}),e.jsx("p",{className:"text-muted-foreground mb-4 flex-1 leading-relaxed",children:r.description}),N&&r.author&&e.jsxs("div",{className:"text-muted-foreground mb-4 flex items-center gap-2 text-sm",children:[y&&r.author.avatar?e.jsx("img",{className:"h-6 w-6 rounded-full object-cover",src:r.author.avatar,alt:r.author.firstName}):null,e.jsxs("span",{children:[r.author.firstName," ",r.author.lastName]})]}),e.jsx(h,{item:r,label:"Read article"})]})]},r.slug))})]}),a.length===0&&e.jsxs("div",{className:"border-border rounded-xl border border-dashed p-8 text-center",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"No articles found"}),e.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Try a different search term or clear your category filter."})]})]})})}export{F as P};
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.