1import{r as o,a as C,b as L,j as e,L as _,m as h,D as M,H as T,c as k,s as G}from"./index-CSRj_zsB.js";import{B as U}from"./Breadcrumbs-tz2w-Bxf.js";import{u as $,L as f}from"./ListingContentBlock-DWhzn9it.js";import"./chevron-right-D0xe0QNm.js";import"./house-1qb6lUcT.js";import"./useTranslatedContent-DBUmTe4e.js";import"./LocaleMarkdown-BTf1yjtp.js";const H=()=>{const[n,g]=o.useState([]),[c,y]=o.useState(!0),[l,b]=o.useState(""),[d,x]=o.useState(null),{canonical:u,hreflangEntries:j}=C("/glossary"),r=$("glossary");L({title:(r==null?void 0:r.meta_title)||"Casino Glossary â CasinoBonusFinders",description:(r==null?void 0:r.meta_description)||"Complete glossary of online casino terms and definitions. Understand RTP, wagering requirements, house edge, and more.",canonical:u,hreflangEntries:j}),o.useEffect(()=>{(async()=>{const{data:a,error:s}=await G.from("glossary_terms").select("*").order("term",{ascending:!0});!s&&a&&g(a),y(!1)})()},[]);const m=o.useMemo(()=>{let t=n;if(l){const a=l.toLowerCase();t=t.filter(s=>s.term.toLowerCase().includes(a)||s.definition.toLowerCase().includes(a))}return d&&(t=t.filter(a=>{var s;return((s=a.term[0])==null?void 0:s.toUpperCase())===d})),t},[n,l,d]),p=o.useMemo(()=>{const t={};return m.forEach(a=>{var i;const s=((i=a.term[0])==null?void 0:i.toUpperCase())||"#";t[s]||(t[s]=[]),t[s].push(a)}),Object.entries(t).sort(([a],[s])=>a.localeCompare(s))},[m]),N=o.useMemo(()=>{const t=new Set(n.map(a=>{var s;return(s=a.term[0])==null?void 0:s.toUpperCase()}));return Array.from(t).sort()},[n]),v=o.useMemo(()=>{const t={};return n.forEach(a=>{t[a.slug]=a.term}),t},[n]),w=(r==null?void 0:r.schema_markup)||{"@context":"https://schema.org","@type":"DefinedTermSet",name:"Casino Glossary",description:"Complete glossary of online casino terms.",url:`https://casinobonusfinders.com${u}`};return e.jsxs(_,{children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(w)}}),e.jsxs("section",{className:"container mx-auto px-4 pt-12 pb-24",children:[e.jsx(U,{items:[{label:(r==null?void 0:r.title)||"Glossary"}]}),e.jsxs(h.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.23,1,.32,1]},className:"max-w-2xl mb-10",children:[e.jsx("h1",{className:"font-display text-4xl md:text-5xl mb-4 leading-tight",children:(r==null?void 0:r.title)||"Casino Glossary"}),e.jsx("p",{className:"text-muted-foreground text-[15px] leading-relaxed max-w-lg",children:"Complete AâZ guide to online casino terminology. Understand RTP, wagering requirements, house edge, and every term you'll encounter."})]}),e.jsx(f,{content:r==null?void 0:r.content,position:"before"}),e.jsxs("div",{className:"relative max-w-md mb-6",children:[e.jsx(M,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search terms...",value:l,onChange:t=>b(t.target.value),className:"w-full h-11 pl-11 pr-4 rounded-xl bg-card border border-border text-[14px] text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1 mb-10",children:[e.jsx("button",{onClick:()=>x(null),className:`w-8 h-8 rounded-lg text-[12px] font-semibold transition-all ${d?"bg-secondary/60 text-muted-foreground hover:bg-secondary":"bg-primary text-primary-foreground"}`,children:"All"}),N.map(t=>e.jsx("button",{onClick:()=>x(d===t?null:t),className:`w-8 h-8 rounded-lg text-[12px] font-semibold transition-all ${d===t?"bg-primary text-primary-foreground":"bg-secondary/60 text-muted-foreground hover:bg-secondary"}`,children:t},t))]}),c&&e.jsx("div",{className:"space-y-3",children:[...Array(8)].map((t,a)=>e.jsx("div",{className:"h-20 rounded-2xl bg-card animate-pulse"},a))}),!c&&m.length===0&&e.jsxs("div",{className:"rounded-2xl border bg-card p-12 text-center",children:[e.jsx(T,{className:"w-8 h-8 text-muted-foreground/40 mx-auto mb-4"}),e.jsx("h3",{className:"font-display text-xl mb-2",children:"No Terms Found"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l?`No results for "${l}".`:"Glossary terms are being prepared."})]}),!c&&p.length>0&&e.jsx("div",{className:"space-y-10",children:p.map(([t,a])=>e.jsxs(h.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4},children:[e.jsx("h2",{className:"font-display text-2xl text-primary mb-4",id:`letter-${t}`,children:t}),e.jsx("div",{className:"space-y-2",children:a.map(s=>e.jsxs("div",{className:"rounded-2xl border bg-card p-5",id:s.slug,children:[e.jsx("h3",{className:"font-semibold text-[15px] mb-2",children:s.term}),e.jsx("p",{className:"text-[13px] text-muted-foreground leading-relaxed",children:s.definition}),s.related_terms&&s.related_terms.length>0&&e.jsxs("div",{className:"flex items-center gap-2 mt-3 flex-wrap",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:"Related:"}),s.related_terms.map(i=>e.jsx("a",{href:`#${i}`,className:"text-[11px] text-primary hover:underline",children:v[i]||i},i))]})]},s.id))})]},t))}),e.jsx("div",{className:"mt-12",children:e.jsx(f,{content:r==null?void 0:r.content_after,position:"after"})}),!c&&n.length>0&&e.jsx("div",{className:"mt-16 text-center",children:e.jsxs("p",{className:"text-[13px] text-muted-foreground",children:[n.length," terms defined · Updated regularly by our"," ",e.jsx(k,{to:"../editorial-policy",className:"text-primary hover:underline",children:"editorial team"})]})})]})]})};export{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.