// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later
// @source: https://gitlab.com/soapbox-pub/ditto/-/tree/f0a3877c
import{Si as e}from"./lucide-icons-BdRF0moN.js";import{t}from"./jsx-runtime-By8HlURe.js";import{t as n}from"./useAppContext-Ughdk2-Z.js";import{t as r}from"./useCurrentUser-C6OJJlWo.js";import{t as i}from"./skeleton-CVls4GW9.js";import{r as a}from"./NoteCard-COwLfrJJ.js";import{i as o}from"./NoteMoreMenu-FwlS01AC.js";import{t as s}from"./usePageRefresh-BuJEOs2u.js";import{C as c,O as l,w as u}from"./index-CYEZWNq6.js";import{t as d}from"./PageHeader-CMi4aeE4.js";var f=t();function p(){let{config:t}=n();u({title:`Bookmarks | ${t.appName}`,description:`Your saved bookmarks on Nostr.`});let{user:i}=r(),{events:p,isLoading:h,isLoadingEvents:g,bookmarkedIds:_}=o(),v=s([`bookmarks`]);return(0,f.jsxs)(`main`,{className:``,children:[(0,f.jsx)(d,{title:`Bookmarks`,icon:(0,f.jsx)(e,{className:`size-5`})}),(0,f.jsx)(c,{onRefresh:v,children:i?h||_.length>0&&g?(0,f.jsx)(`div`,{className:`divide-y divide-border`,children:Array.from({length:4}).map((e,t)=>(0,f.jsx)(m,{},t))}):p.length>0?(0,f.jsx)(`div`,{children:p.map(e=>(0,f.jsx)(a,{event:e},e.id))}):(0,f.jsxs)(`div`,{className:`py-20 px-8 flex flex-col items-center gap-6 text-center`,children:[(0,f.jsx)(`div`,{className:`p-4 rounded-full bg-muted`,children:(0,f.jsx)(e,{className:`size-8 text-muted-foreground`})}),(0,f.jsxs)(`div`,{className:`space-y-2 max-w-xs`,children:[(0,f.jsx)(`h2`,{className:`text-xl font-bold`,children:`No bookmarks yet`}),(0,f.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`When you bookmark a post, it will show up here. Tap the bookmark icon on any post to save it.`})]})]}):(0,f.jsxs)(`div`,{className:`py-20 px-8 flex flex-col items-center gap-6 text-center`,children:[(0,f.jsx)(`div`,{className:`p-4 rounded-full bg-primary/10`,children:(0,f.jsx)(e,{className:`size-8 text-primary`})}),(0,f.jsxs)(`div`,{className:`space-y-2 max-w-xs`,children:[(0,f.jsx)(`h2`,{className:`text-xl font-bold`,children:`Save posts for later`}),(0,f.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Log in to bookmark posts and find them here anytime.`})]}),(0,f.jsx)(l,{className:`max-w-60`})]})})]})}function m(){return(0,f.jsx)(`div`,{className:`px-4 py-3 border-b border-border`,children:(0,f.jsxs)(`div`,{className:`flex gap-3`,children:[(0,f.jsx)(i,{className:`size-11 rounded-full shrink-0`}),(0,f.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(i,{className:`h-4 w-24`}),(0,f.jsx)(i,{className:`h-3 w-32`}),(0,f.jsx)(i,{className:`h-3 w-8`})]}),(0,f.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,f.jsx)(i,{className:`h-4 w-full`}),(0,f.jsx)(i,{className:`h-4 w-4/5`})]}),(0,f.jsxs)(`div`,{className:`flex gap-12 mt-2`,children:[(0,f.jsx)(i,{className:`h-4 w-8`}),(0,f.jsx)(i,{className:`h-4 w-8`}),(0,f.jsx)(i,{className:`h-4 w-8`}),(0,f.jsx)(i,{className:`h-4 w-8`})]})]})]})})}export{p as BookmarksPage};
// @license-end
