import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{ki as t,lr as n}from"./lucide-icons-BjbcRgLk.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{a as i}from"./downloadFile-kpATXaJi.js";import{t as a}from"./utils-BFSTDHdM.js";var o=e(t(),1),s=r(),c=[{name:`NostrHub`,base:`https://nostrhub.io/`,favicon:`https://nostrhub.io/favicon-32x32.png`,primary:!0},{name:`Gitworkshop`,base:`https://gitworkshop.dev/`,favicon:`https://gitworkshop.dev/favicon.svg`,primary:!1}];function l({site:e,nip19:t}){let[r,c]=(0,o.useState)(!1),l=`${e.base}${t}`;return(0,s.jsxs)(`a`,{href:l,className:a(`inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium transition-colors`,e.primary?`bg-primary text-primary-foreground shadow-sm hover:bg-primary/90`:`border border-border text-muted-foreground hover:bg-secondary/60 hover:text-foreground`),onClick:e=>{e.preventDefault(),e.stopPropagation(),i(l)},children:[r?(0,s.jsx)(n,{className:`size-3.5`}):(0,s.jsx)(`img`,{src:e.favicon,alt:``,className:`size-3.5 object-contain`,loading:`lazy`,onError:()=>c(!0),decoding:`async`}),`View on `,e.name]})}function u({nip19:e,className:t}){return e?(0,s.jsx)(`div`,{className:a(`flex flex-wrap gap-2`,t),children:c.map(t=>(0,s.jsx)(l,{site:t,nip19:e},t.name))}):null}export{u as t};