// @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{On as e,Sr as t}from"./lucide-icons-BdRF0moN.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{t as r}from"./button-Cs26nq0r.js";import{t as i}from"./ExternalFavicon-BWUhHW7H.js";import{c as a,l as o,n as s,r as c,t as l}from"./dialog-C3CFmras.js";var u=n();function d({kindDef:n,icon:d,open:f,onOpenChange:p}){let{label:m,blurb:h,sites:g}=n;return!g?.length&&!h?null:(0,u.jsxs)(l,{open:f,onOpenChange:p,children:[(0,u.jsx)(o,{asChild:!0,children:(0,u.jsx)(r,{variant:`ghost`,size:`icon`,className:`size-8 rounded-full text-muted-foreground hover:text-foreground`,children:(0,u.jsx)(e,{className:`size-4`})})}),(0,u.jsx)(s,{className:`max-w-xs rounded-xl p-6`,children:(0,u.jsxs)(`div`,{className:`flex flex-col items-center text-center gap-4`,children:[d&&(0,u.jsx)(`div`,{className:`text-primary [&>svg]:size-10`,children:d}),(0,u.jsx)(a,{className:`text-lg`,children:m}),h&&(0,u.jsx)(c,{className:`text-sm leading-relaxed`,children:h}),g&&g.length>0&&(0,u.jsx)(`div`,{className:`w-full space-y-1.5 pt-1`,children:g.map(e=>{let n=new URL(e.url).hostname,r=e.name??n.split(`.`)[0].replace(/^./,e=>e.toUpperCase());return(0,u.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center justify-center gap-2 w-full px-4 py-2.5 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 transition-colors`,children:[(0,u.jsx)(i,{url:e.url,size:16}),r,(0,u.jsx)(t,{className:`size-3.5 opacity-70`})]},e.url)})})]})})]})}export{d as t};
// @license-end
