1import{u as g,a as p,b as x,c as P,P as j,j as e,S as i,C as y,R as S,e as _,f as L}from"./index-CdUOs3ic.js";import{u as f,L as R}from"./usePaginatedList-Dcp8I9bA.js";import{P as T}from"./PageHeader-qZdAcDSm.js";import{g as M}from"./grid.module-0b81G5dV.js";const N="_summary_1epft_1",b="_altSearch_1epft_11",m={summary:N,altSearch:b},H=()=>{const{t:a}=g(),{languageId:c}=p(),[o]=x(),{play:h,player:d}=P(),t=o.get("searchText")??"",l=o.get("searchOption")??"2",n=o.get("poetryType")??j.motanabbi,s=f((r,u)=>t===""?Promise.resolve({success:!0,data:{items:[],total:0,isLastPage:!0}}):L.searchPoems(c,t,l,n,r,u),[c,t,l,n]);return e.jsxs(e.Fragment,{children:[e.jsx(T,{eyebrow:a("Poem_Search"),title:t===""?a("Search"):`"${t}"`,children:t!==""&&!s.isLoading&&s.error===null&&e.jsxs("p",{className:m.summary,children:[a("Total_Poems"),": ",e.jsx("strong",{children:s.total})]})}),t===""?e.jsx(i,{title:a("MustEnterValue"),description:a("NoResultsHint"),icon:"search"}):s.isLoading?e.jsx(y,{count:8}):s.error?e.jsx(i,{variant:"error",title:a("No_Results"),description:s.error.message,actionLabel:a("Retry"),onAction:s.retry}):s.items.length===0?e.jsx(i,{title:a("No_Results"),description:a("NoResultsHint"),icon:"search_off",children:e.jsx("a",{className:m.altSearch,href:`${S.roots}?searchText=${encodeURIComponent(t)}`,children:a("search_root")})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:M.cardGrid,children:s.items.map(r=>e.jsx(_,{poem:r,poetryType:n,searchPhrase:t,onListen:h},r.poemId))}),e.jsx(R,{shown:s.items.length,total:s.total,hasMore:s.hasMore,isLoading:s.isLoadingMore,onLoadMore:s.loadMore})]}),d]})};export{H as SearchResultsPage,H as default};
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.