1import{c as x,r as p,j as e,S as u,w as b,L as t}from"./index-67LlgSUO.js";import{u as f}from"./useFavorites-D05DBE3Y.js";import{t as h}from"./tarotCards-nVVtJEF8.js";import{t as g}from"./spreads-zDk5wdUr.js";import{b as y}from"./blogPosts-i-gW5mdC.js";import{s as n}from"./slug-N-3xdCnr.js";import{S as j}from"./SEO-LGROgMNh.js";import{H as l}from"./heart-YLIscZyI.js";import{B as v}from"./book-open--RyWHzE8.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const N=x("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]),k=[{key:"card",label:"Cards",icon:u},{key:"spread",label:"Spreads",icon:b},{key:"blog",label:"Reads",icon:v},{key:"journal_entry",label:"Journal",icon:N}],$=()=>{const[a,i]=p.useState("card"),{favorites:d,loading:c}=f(a);function m(r){if(a==="card"){const s=h.find(o=>String(o.id)===r||n(o.name)===r);return s?e.jsxs(t,{to:`/cards/${n(s.name)}`,className:"rounded-lg border border-border bg-card p-4 transition-colors hover:border-primary hover:bg-secondary",children:[e.jsx("p",{className:"font-display text-sm font-semibold text-foreground",children:s.name}),e.jsx("p",{className:"text-xs text-muted-foreground capitalize",children:s.suit})]},r):null}if(a==="spread"){const s=g.find(o=>o.id===r);return s?e.jsxs(t,{to:`/spreads/${s.id}`,className:"rounded-lg border border-border bg-card p-4 transition-colors hover:border-primary hover:bg-secondary",children:[e.jsx("p",{className:"font-display text-sm font-semibold text-foreground",children:s.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.cardCount," cards"]})]},r):null}if(a==="blog"){const s=y.find(o=>o.slug===r);return s?e.jsxs(t,{to:`/blog/${s.slug}`,className:"rounded-lg border border-border bg-card p-4 transition-colors hover:border-primary hover:bg-secondary",children:[e.jsx("p",{className:"font-display text-sm font-semibold text-foreground",children:s.title}),e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.excerpt})]},r):null}return e.jsxs(t,{to:"/app/journal",className:"rounded-lg border border-border bg-card p-4 transition-colors hover:border-primary hover:bg-secondary",children:[e.jsx("p",{className:"font-display text-sm font-semibold text-foreground",children:"Journal entry"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Open journal to view"})]},r)}return e.jsxs("div",{className:"mx-auto max-w-3xl px-6 pb-16",children:[e.jsx(j,{title:"Favorites | Tarot Tutor Academy",description:"Your saved cards, spreads, and reads.",path:"/app/favorites",noindex:!0}),e.jsxs("header",{className:"py-8",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-display text-3xl font-bold text-foreground",children:"Favorites"})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Everything you have saved, in one place."})]}),e.jsx("div",{className:"mb-6 flex gap-2 overflow-x-auto",children:k.map(r=>e.jsxs("button",{onClick:()=>i(r.key),className:`inline-flex items-center gap-1.5 rounded-full border px-3.5 py-1.5 text-xs font-medium transition-colors ${a===r.key?"border-primary bg-primary text-primary-foreground":"border-border bg-background text-muted-foreground hover:text-foreground"}`,children:[e.jsx(r.icon,{className:"h-3.5 w-3.5"}),r.label]},r.key))}),c?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loadingâ¦"}):d.length===0?e.jsxs("div",{className:"rounded-lg border border-dashed border-border p-8 text-center",children:[e.jsx(l,{className:"mx-auto mb-3 h-6 w-6 text-muted-foreground"}),e.jsx("p",{className:"font-display text-sm text-foreground",children:"No favorites yet"}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Tap the heart on any card, spread, or read to save it here."})]}):e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:d.map(r=>m(r.item_id))})]})};export{$ 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.