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-CjsAPSkg.js";import{t as v}from"./i18n-BcowkkaP.js";import{t as y}from"./AppLayout-BApD7QYM.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=t({__name:`Index`,props:{items:{}},setup(t){let B=t,V=g(`all`),H=g(``),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=_(()=>{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`)}return(t,g)=>(r(),e(f,null,[n(d(m),{title:d(v)(`Extensions & Themes`)},null,8,[`title`]),n(y,null,{default:i(()=>[p(`div`,b,[p(`header`,x,[p(`h1`,S,o(d(v)(`Extensions & Themes`)),1),p(`p`,C,o(d(v)(`Extend your community — add features and reskin it with one click. Free and premium add-ons, all built for Convoro.`)),1)]),p(`div`,w,[p(`div`,T,[(r(),e(f,null,a(W,e=>p(`button`,{key:e.key,type:`button`,onClick:t=>V.value=e.key,class:u([`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`])},[c(o(e.label)+` `,1),p(`span`,D,o(U.value[e.key]),1)],10,E)),64))]),p(`div`,O,[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=>H.value=e,type:`search`,placeholder:d(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),[[h,H.value]])])]),G.value.length?(r(),e(`div`,j,[(r(!0),e(f,null,a(G.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`,M,[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`,N,[p(`h3`,P,o(t.name),1),p(`p`,F,o(t.author||`Convoro`)+` · `+o(d(v)(`v{version}`,{version:t.version})),1)])]),p(`p`,I,o(t.description),1),p(`div`,L,[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`,R,o(d(v)(`Active`)),1)):s(``,!0),p(`span`,{class:u([`ml-auto text-sm font-extrabold`,t.premium?`text-amber-600`:`text-ink-muted`])},o(K(t)),3)])]))),128))])):(r(),e(`div`,A,o(d(v)(`Nothing here yet — check back soon.`)),1)),p(`p`,z,o(d(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};