1import{a as d,j as t}from"./index-D5uQ2A58.js";import{u as N,r as s}from"./vendor-QBELzlxK.js";import{u as S,a as y,b as C}from"./hooks-B21J7nAM.js";import{S as E}from"./SectionHead-CVGl532i.js";const k=16;function A(){S("ÙØªØ¨ اÙÙ
Ø±ÙØ²");const m=N(),[n,u]=s.useState(""),[i,p]=s.useState(""),[a,r]=s.useState(""),[f,x]=s.useState([]),{items:l,count:h,loading:c,load:o,reset:j}=y(e=>d.getBooks("books",i,e,k,a||""),[i,a]);s.useEffect(()=>{d.getList("dropdown").then(e=>x((e.data||[]).sort((v,b)=>v-b))).catch(()=>{})},[]),s.useEffect(()=>{j(),o()},[i,a]),C(o);const g=e=>{localStorage.setItem("id",e._id),m(`/books/${e.id}`)};return t.jsxs("div",{className:"container wide",children:[t.jsx(E,{title:"ÙØªØ¨ اÙÙ
Ø±ÙØ²",kicker:"إصدارات Ø´ÙØ±ÙØ©",count:h,as:"h1"}),t.jsxs("div",{className:"filterbar",style:{justifyContent:"center"},"aria-label":"تصÙÙØ© ØØ³Ø¨ Ø§ÙØ³ÙØ©",children:[t.jsx("button",{type:"button",className:`fbtn${a===""?" on":""}`,onClick:()=>r(""),children:"اÙÙÙ"}),f.map(e=>t.jsx("button",{type:"button",className:`fbtn${String(a)===String(e)?" on":""}`,onClick:()=>r(e),children:e},e))]}),t.jsx("div",{className:"filterbar",style:{justifyContent:"center"},children:t.jsxs("form",{onSubmit:e=>{e.preventDefault(),p(n)},style:{display:"flex",gap:8},children:[t.jsx("input",{type:"text",placeholder:"Ø§Ø¨ØØ« Ù٠اÙÙØªØ¨â¦",value:n,onChange:e=>u(e.target.value)}),t.jsx("button",{className:"btn",type:"submit",children:"Ø¨ØØ«"})]})}
1),t.jsx("div",{className:"covers-grid",children:l.map(e=>t.jsx("div",{className:"card covercard cursor",onClick:()=>g(e),children:t.jsx("div",{className:"thumb",children:t.jsx("img",{src:e.frontimage,alt:e.title,loading:"lazy"})})},e._id))}),c&&t.jsxs("div",{className:"loading",children:[t.jsx("div",{className:"spinner"})," جار٠تØÙ
Ù٠اÙÙ
Ø²ÙØ¯â¦"]}),!c&&l.length===0&&t.jsx("div",{className:"empty",children:"ÙØ§ ØªÙØ¬Ø¯ Ø¨ÙØ§Ùات Ù
ØªØ§ØØ©"})]})}export{A 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.