1import{a as U,j as a,f as d,d as f,e as r,o as c,E as u,a8 as B,l as S,g as _,a9 as P,q as h,c as k,ad as E,F as j,G as A,aA as F,B as L}from"./FTaPbxLM.js";import T from"./B9hwvYFO.js";import"./BzVpgML3.js";const z={class:"flex flex-col gap-5 border-t border-base-200 pt-5 lg:flex-row lg:items-center lg:justify-between"},D={key:0,class:"text-xl tracking-normal dark:text-base-100"},G={class:"flex gap-2"},W={__name:"SocialShare",props:{component:{type:Object,default:()=>({})},text:{type:String,default:"Share"},socialPlatforms:{type:Array,default:()=>["LinkedIn","X","Whatsapp","Email"]},narrowContent:{type:Boolean,default:!0}},setup(w){const i=S(),b=U(),s=w,p=a(()=>{var e,n;return((n=(e=s.component)==null?void 0:e.properties)==null?void 0:n.title)||s.text}),v=a(()=>{var e,n;return((n=(e=s.component)==null?void 0:e.properties)==null?void 0:n.socialPlatforms)||s.socialPlatforms}),$=a(()=>{var e,n;return((n=(e=s.component)==null?void 0:e.properties)==null?void 0:n.narrowContent)??s.narrowContent}),o=a(()=>`${i.public.currentDomain}${b.fullPath}`),t=a(()=>encodeURIComponent(p.value)),g=a(()=>[{name:"LinkedIn",icon:"lucide:linkedin",url:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(o.value)}`},{name:"Facebook",icon:"lucide:facebook",url:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(o.value)}`},{name:"X",icon:"simple-icons:x",url:`https://twitter.com/intent/tweet?text=${t.value}&url=${encodeURIComponent(o.value)}`},{name:"Whatsapp",icon:"simple-icons:whatsapp",url:`https://api.whatsapp.com/send?text=${t.value}%20${encodeURIComponent(o.value)}`},{name:"Mastodon",icon:"simple-icons:mastodon",url:`https://mastodon.social/share?text=${t.value}%20${encodeURIComponent(o.value)}`},{name:"Email",icon:"lucide:mail",url:`mailto:?subject=${t.value}&body=${t.value}%0A${encodeURIComponent(o.value)}`},{name:"Signal",icon:"simple-icons:signal",url:`signal://send?text=${t.value}%20${encodeURIComponent(o.value)}`},{name:"Facebook messenger",icon:"lucide:message-circle",url:`https://www.facebook.com/dialog/send?app_id=${encodeURIComponent(i.public.facebookAppId)}&link=${encodeURIComponent(o.value)}&redirect_uri=${encodeURIComponent(i.public.currentDomain)}`},{name:"Instagram",icon:"simple-icons:instagram",url:`https://www.instagram.com/?url=${encodeURIComponent(o.value)}`},{name:"BlueSky",icon:"simple-icons:bluesky",url:`https://bsky.app/compose/post?text=${t.value}%20${encodeURIComponent(o.value)}`},{name:"TikTok",icon:"simple-icons:tiktok",url:`https://www.tiktok.com/share?text=${t.value}%20${encodeURIComponent(o.value)}`}]),m=a(()=>g.value.filter(e=>{var n;return(n=v.value)==null?void 0:n.includes(e.name)})),C=e=>{if(e.name==="Email"){window.open(e.url,"_blank","noopener,noreferrer");return}window.open(e.url,"_blank","noopener,noreferrer")};return(e,n)=>{const x=L,I=T,R=P,y=B;return r(m).length?(c(),d(y,{key:0},{default:u(()=>[_(R,{narrow:r($)},{default:u(()=>[h("div",z,[r(p)?(c(),k("p",D,E(r(p)),1)):f("",!0),h("div",G,[(c(!0),k(j,null,A(r(m),l=>(c(),d(I,{key:l.name,link:{url:l.url,target:"_blank",rel:"noopener noreferrer"},class:"relative size-12 cursor-pointer rounded-full bg-base-200 hover:bg-base-200/50 lg:size-14","show-label":!1,"aria-label":`Share on ${l.name}`,onClick:F(M=>C(l),["prevent"])},{default:u(()=>[_(x,{class:"absolute left-1/2 top-1/2 size-5 -translate-x-1/2 -translate-y-1/2 text-base-300",name:l.icon},null,8,["name"])]),_:2},1032,["link","aria-label","onClick"]))),128))])])]),_:1},8,["narrow"])]),_:1})):f("",!0)}}};export{W 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.