1import{j as s}from"./vendor-ui-C5uUR9FI.js";import{u as x,A as u,c as g,B as c,d as h}from"./index-D9IvvA3z.js";import{b as v,ab as f}from"./vendor-icons-Dq8JycpU.js";import"./vendor-react-UhGOjVAE.js";import"./vendor-charts-3dGtiZaw.js";function y(){const{themes:i,activeTheme:o,setActiveTheme:r}=x(),d=a=>{r(a),h.success("Theme activated")},t=[...new Set(i.map(a=>a.category))];return s.jsxs(s.Fragment,{children:[s.jsx(u,{title:"Themes",subtitle:"Choose a theme for your website"}),s.jsx("div",{className:"flex-1 overflow-auto p-6",children:t.map(a=>s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:a}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:i.filter(e=>e.category===a).map(e=>{const l=o.id===e.id;return s.jsxs("div",{className:g("cms-card overflow-hidden group",l&&"ring-2 ring-primary"),children:[s.jsxs("div",{className:"aspect-[4/3] relative",style:{backgroundColor:e.config.colors.background},children:[s.jsxs("div",{className:"absolute inset-4 rounded-lg shadow-lg overflow-hidden",children:[s.jsx("div",{className:"h-8 flex items-center px-3",style:{backgroundColor:e.config.colors.primary},children:s.jsxs("div",{className:"flex gap-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-white/30"}),s.jsx("div",{className:"w-2 h-2 rounded-full bg-white/30"}),s.jsx("div",{className:"w-2 h-2 rounded-full bg-white/30"})]})}),s.jsxs("div",{className:"p-3 space-y-2",style:{backgroundColor:e.config.colors.background},children:[s.jsx("div",{className:"h-2 w-3/4 rounded",style:{backgroundColor:e.config.colors.text}}
1),s.jsx("div",{className:"h-2 w-1/2 rounded opacity-50",style:{backgroundColor:e.config.colors.text}}),s.jsx("div",{className:"h-6 w-20 rounded mt-3",style:{backgroundColor:e.config.colors.accent}})]})]}),l&&s.jsxs("div",{className:"absolute top-2 right-2 bg-primary text-primary-foreground px-2 py-1 rounded text-xs font-medium flex items-center gap-1",children:[s.jsx(v,{className:"w-3 h-3"}),"Active"]})]}),s.jsxs("div",{className:"p-4",children:[s.jsx("h3",{className:"font-semibold",children:e.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e.description}),s.jsx("div",{className:"flex gap-1 mt-3",children:Object.values(e.config.colors).slice(0,5).map((n,m)=>s.jsx("div",{className:"w-6 h-6 rounded-full border",style:{backgroundColor:n}},m))}),s.jsxs("div",{className:"mt-4 flex gap-2",children:[s.jsx(c,{onClick:()=>d(e.id),disabled:l,className:"flex-1",variant:l?"secondary":"default",children:l?"Active":"Activate"}),s.jsx(c,{variant:"outline",size:"icon",children:s.jsx(f,{className:"w-4 h-4"})})]})]})]},e.id)})})]},a))})]})}export{y as ThemesManager};
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.