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