import{d as m,b as g,s as f,x as w,c as t,a as n,F as h,j as o,t as s,h as y,u as b,C as k,m as z,o as i,_ as E,a3 as L,a4 as M}from"./_plugin-vue_export-helper-0830d71a.js";import j from"./tree-loading-d274abdc.js";const C=["src"],P={style:{display:"flex","flex-direction":"column"}},B={style:{display:"flex","flex-direction":"column",padding:"12px",gap:"8px"}},N={key:0,style:{"font-size":"18px","font-weight":"500",color:"#19191a",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},S={key:1,style:{"font-size":"14px","font-weight":"400",color:"#8b8c8f",overflow:"hidden",display:"-webkit-box","-webkit-line-clamp":"2","line-clamp":"2","-webkit-box-orient":"vertical"}},V={style:{display:"flex",gap:"8px","align-items":"center",padding:"12px"}},A=["src"],F={style:{"font-size":"14px",color:"#b7b9bd",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},U={key:1,style:{height:"176px",display:"flex","flex-direction":"column",gap:"6px","justify-content":"center","align-items":"center","font-size":"12px"}},D=m({__name:"LinkPreview",setup(q){const e=g(null),_=()=>{window.dispatchEvent(new CustomEvent("bmp-plugin-remove-link-preview"))},l=a=>{e.value=a.detail};return f(()=>{window.addEventListener("bmp-plugin-link-preview",l)}),w(()=>{window.removeEventListener("bmp-plugin-link-preview",l)}),(a,p)=>{var d,r,c,u,v;return i(),t("div",{class:"bm-plugin-link-container",onMouseup:_},[n("div",{style:k({width:e.value?"400px":"200px","border-radius":"18px",display:"flex","flex-direction":"column",gap:"12px",padding:"12px",background:"white"}),onMouseup:p[0]||(p[0]=z(()=>{},["stop"]))},[e.value?(i(),t(h,{key:0},[(d=e.value)!=null&&d.image?(i(),t("img",{key:0,style:{"border-radius":"8px",height:"200px","object-fit":"cover"},src:e.value.image},null,8,C)):o("",!0),n("div",P,[n("div",B,[(r=e.value)!=null&&r.title?(i(),t("span",N,s(e.value.title),1)):o("",!0),(c=e.value)!=null&&c.description?(i(),t("span",S,s(e.value.description),1)):o("",!0)]),n("div",V,[(u=e.value)!=null&&u.logo?(i(),t("img",{key:0,style:{width:"17px",height:"17px","object-fit":"contain"},src:e.value.logo},null,8,A)):o("",!0),n("span",F,s((v=e.value)==null?void 0:v.url),1)])])],64)):(i(),t("div",U,[y(b(j),{style:{width:"48px",height:"48px"},class:"bm-plugin-link-animate-spin"})]))],36)],32)}}});const I=E(D,[["__scopeId","data-v-4c9550d7"]]),x=L(I);x.use(M());x.mount("#bm-plugin-link-app");
