import{C as e,D as t,E as n,G as r,L as i,Q as a,R as o,W as s,Y as c,Z as l,b as u,et as d,k as f,m as p,r as m,v as h,w as g,x as _}from"./app-0sFJS-qa.js";import{t as v}from"./i18n-Cp_nlBSq.js";import{t as y}from"./AppLayout-B4lukTAt.js";var b={class:`mx-auto max-w-[var(--c-container)]`},x={class:`mb-6 rounded-c border border-line bg-surface p-7 sm:p-9`},S={class:`text-3xl font-extrabold tracking-tight sm:text-4xl`},C={class:`mt-2 max-w-2xl text-ink-2`},w={class:`mb-5 flex flex-wrap items-center gap-3`},T={class:`flex items-center gap-1 rounded-c border border-line bg-surface p-1`},E=[`onClick`],D={class:`opacity-70`},O={class:`ml-auto flex items-center gap-2 rounded-full border border-line bg-surface px-4 py-2`},k=[`placeholder`],A={key:0,class:`rounded-c border border-dashed border-line bg-surface p-12 text-center text-ink-muted`},j={key:1,class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3`},M={class:`flex items-start gap-3`},N={class:`min-w-0 flex-1`},P={class:`truncate text-lg font-bold leading-tight`},F={class:`text-xs text-ink-muted`},I={class:`mt-3 line-clamp-3 flex-1 text-sm text-ink-2`},L={class:`mt-4 flex items-center gap-2 border-t border-line pt-4`},R={key:0,class:`rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-xs font-semibold text-emerald-600`},z={class:`mt-8 text-center text-sm text-ink-muted`},B=f({__name:`Index`,props:{items:{}},setup(f){let B=f,V=c(`all`),H=c(``),U=u(()=>({all:B.items.length,extension:B.items.filter(e=>e.type===`extension`).length,theme:B.items.filter(e=>e.type===`theme`).length})),W=[{key:`all`,label:v(`All`)},{key:`extension`,label:v(`Extensions`)},{key:`theme`,label:v(`Themes`)}],G=u(()=>{let e=H.value.trim().toLowerCase();return B.items.filter(t=>V.value!==`all`&&t.type!==V.value?!1:e?[t.name,t.description,t.author,t.id].some(t=>(t||``).toLowerCase().includes(e)):!0)});function K(e){if(!e.premium)return v(`Free`);let t=Number(e.price);return t>0?`$${t}`:v(`Premium`)}let q=[`bg-rose-500/15 text-rose-500`,`bg-sky-500/15 text-sky-500`,`bg-emerald-500/15 text-emerald-500`,`bg-amber-500/15 text-amber-500`,`bg-violet-500/15 text-violet-500`,`bg-fuchsia-500/15 text-fuchsia-500`,`bg-cyan-500/15 text-cyan-500`,`bg-indigo-500/15 text-indigo-500`];function J(e){let t=String(e.id||e.name||``),n=0;for(let e=0;e<t.length;e++)n=n*31+t.charCodeAt(e)>>>0;return q[n%q.length]}return(c,u)=>(i(),g(h,null,[t(l(m),{title:l(v)(`Extensions & Themes`)},null,8,[`title`]),t(y,null,{default:s(()=>[_(`div`,b,[_(`header`,x,[_(`h1`,S,d(l(v)(`Extensions & Themes`)),1),_(`p`,C,d(l(v)(`Extend your community — add features and reskin it with one click. Free and premium add-ons, all built for Convoro.`)),1)]),_(`div`,w,[_(`div`,T,[(i(),g(h,null,o(W,e=>_(`button`,{key:e.key,type:`button`,onClick:t=>V.value=e.key,class:a([`rounded-lg px-3 py-1.5 text-sm font-semibold transition`,V.value===e.key?`bg-primary text-white`:`text-ink-2 hover:bg-surface-2`])},[n(d(e.label)+` `,1),_(`span`,D,d(U.value[e.key]),1)],10,E)),64))]),_(`div`,O,[u[1]||=_(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,class:`text-ink-muted`},[_(`circle`,{cx:`11`,cy:`11`,r:`7`}),_(`path`,{d:`m21 21-4.3-4.3`})],-1),r(_(`input`,{"onUpdate:modelValue":u[0]||=e=>H.value=e,type:`search`,placeholder:l(v)(`Search add-ons…`),class:`w-48 border-0 bg-transparent p-0 text-sm text-ink placeholder:text-ink-muted focus:ring-0`},null,8,k),[[p,H.value]])])]),G.value.length?(i(),g(`div`,j,[(i(!0),g(h,null,o(G.value,t=>(i(),g(`article`,{key:t.id,class:`flex flex-col rounded-c border border-line bg-surface p-6 shadow-sm transition hover:-translate-y-0.5 hover:shadow-md`},[_(`div`,M,[_(`div`,{class:a([`grid h-12 w-12 shrink-0 place-items-center rounded-xl text-xl`,J(t)])},d(t.type===`theme`?`🎨`:`🧩`),3),_(`div`,N,[_(`h3`,P,d(t.name),1),_(`p`,F,d(t.author||`Convoro`)+` · `+d(l(v)(`v{version}`,{version:t.version})),1)])]),_(`p`,I,d(t.description),1),_(`div`,L,[_(`span`,{class:a([`rounded-full px-2.5 py-0.5 text-xs font-semibold`,t.type===`theme`?`bg-fuchsia-500/15 text-fuchsia-600`:`bg-primary/15 text-primary`])},d(t.type),3),t.active?(i(),g(`span`,R,d(l(v)(`Active`)),1)):e(``,!0),_(`span`,{class:a([`ml-auto text-sm font-extrabold`,t.premium?`text-amber-600`:`text-ink-muted`])},d(K(t)),3)])]))),128))])):(i(),g(`div`,A,d(l(v)(`Nothing here yet — check back soon.`)),1)),_(`p`,z,d(l(v)(`More free & premium add-ons are coming to the Convoro store. Built something? Developer docs are on the way.`)),1)])]),_:1})],64))}});export{B as default};