import{j as e,H as m,S as n,V as c,g as l}from"./vendor-laZsiqLO.js";import{G as x}from"./GuestLayout-Bncnlxxo.js";import{P as u}from"./PostCard-S-gB25Ls.js";import{B as d}from"./button-B8f8jW4H.js";import{u as h}from"./useTranslation-BW0o-tkY.js";import"./SiteLogo-DML5Oulk.js";import"./dropdown-menu-CpMN0BZ0.js";import"./utils-RgT4yCq8.js";import"./input-CT5MkJwj.js";import"./sheet-Cp4V1hdh.js";import"./useFlashMessages-CQoLOBuv.js";import"./AdSlot-HY9FvbmL.js";import"./RightSidebarFooter-BO77c1r9.js";import"./avatar-1RNhlzAH.js";import"./badge-CJ9RzXvO.js";import"./card-BKDXjfy_.js";function $({posts:t,query:a}){const{t:s}=h(),o=s("_found_results",'Found {total} results for "{query}"').replace("{total}",t.total).replace("{query}",a);return e.jsxs(x,{children:[e.jsx(m,{title:`${s("_search","Search")}: ${a}`}),e.jsx("div",{className:"bg-background min-h-screen pb-20",children:e.jsxs("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8 py-8 max-w-[1280px]",children:[e.jsxs("div",{className:"mb-8 border-b border-border pb-6",children:[e.jsxs("h1",{className:"text-3xl font-extrabold tracking-tight flex items-center gap-3",children:[e.jsx(n,{className:"w-8 h-8 text-primary"}),s("_search_results","Search Results")]}),e.jsx("p",{className:"text-muted-foreground mt-2 text-lg",children:o})]}),t.data.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.data.map(r=>e.jsx(u,{post:r},r.id))}):e.jsxs("div",{className:"text-center py-20 bg-muted/30 border border-dashed border-border flex flex-col items-center rounded-[var(--radius)]",children:[e.jsx(c,{className:"w-12 h-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-xl font-bold text-muted-foreground",children:s("_no_stories_found","No stories found.")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s("_try_different_keywords","Try searching for different keywords.")}),e.jsx(d,{asChild:!0,className:"mt-6",children:e.jsx(l,{href:"/",children:s("_back_home","Back Home")})})]}),t.data.length>0&&t.last_page>1&&e.jsx("div",{className:"mt-12 flex flex-wrap justify-center gap-2",children:t.links.map((r,i)=>e.jsx(d,{variant:r.active?"default":"outline",disabled:!r.url,asChild:!!r.url,className:"h-10 px-4 min-w-[40px]",children:r.url?e.jsx(l,{href:r.url,dangerouslySetInnerHTML:{__html:r.label}}):e.jsx("span",{dangerouslySetInnerHTML:{__html:r.label}})},i))})]})})]})}export{$ as default};
