1import{j as e,m}from"./vendor-motion-DeqZC-4t.js";import{r as a,L as x}from"./vendor-react-DhMA_kEV.js";import{b as p,B as u}from"./App-CVGAgymZ.js";import{s as h}from"./index-WqAUWWUN.js";import{cX as o,a as g,a1 as f}from"./vendor-icons-xAlReevQ.js";import"./vendor-query-cy1x5wk5.js";import"./vendor-charts-DKUbyPp_.js";import"./logChunkLoadFailure-BWuYLh8E.js";import"./vendor-supabase-CHGq0V2O.js";function H(){const[r,d]=a.useState([]),[s,i]=a.useState(!0),n=p(),l=async()=>{i(!0);const{data:t}=await h.from("wiki_entries").select("slug, title, subtitle, vibe_rating, category, created_at").eq("tenant_id",n.id).gte("vibe_rating",70).order("created_at",{ascending:!0}).limit(12);d(t||[]),i(!1)};return a.useEffect(()=>{l()},[n.id]),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"font-black text-xl flex items-center gap-2",children:[e.jsx(o,{className:"w-5 h-5 text-pink-500"}),"Hidden Gems"]}),e.jsxs(u,{variant:"ghost",size:"sm",onClick:l,disabled:s,className:"gap-1",children:[e.jsx(g,{className:`w-3 h-3 ${s?"animate-spin":""}`}),"Refresh"]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"High-quality entries that deserve more attention. The anti-trending page."}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:r.map((t,c)=>e.jsx(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:c*.05},children:e.jsxs(x,{to:`/entry/${t.slug}`,className:"block bg-card border border-border rounded-xl p-4 hover:border-primary/40 hover:shadow-lg transition-all group",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-muted border border-border uppercase font-bold",children:t.category}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(f,{className:"w-3 h-3 text-yellow-500"}),e.jsx("span",{className:"text-xs font-bold",children:t.vibe_rating})]})]}),e.jsx("h3",{className:"font-bold text-sm group-hover:text-primary transition-colors line-clamp-2",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:t.subtitle}),e.jsxs("div",{className:"flex items-center gap-1 mt-2 text-xs text-muted-foreground",children:[e.jsx(o,{className:"w-3 h-3 text-pink-400"}),e.jsx("span",{children:"Hidden gem"})]})]})},t.slug))}),r.length===0&&!s&&e.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No hidden gems found yet. Generate some entries first!"})]})}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.