import{d as m,u as f,al as h,c as k,ap as _,e as c,i as l,w as i,a5 as w,j as z,f as b,r as g,I as y,k as S,t as C,h as I,F as D,H as T,J as L}from"./index-0LqjRhnu.js";import{s as v,a as P,b as x,c as F,d as O}from"./social-share-D7bNg1yo.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="28cd1ffb-d376-4837-9f4a-5d5569afefa0",o._sentryDebugIdIdentifier="sentry-dbid-28cd1ffb-d376-4837-9f4a-5d5569afefa0")}catch{}})();const E=m({__name:"ShareDropdown",props:{content:{},hashtags:{}},setup(o){const t=o,{t:e}=f(),{toast:n}=h(),p=k(()=>{const r={title:t.content.title,description:t.content.content,url:t.content.href,hashtags:t.hashtags};return[{network:"twitter",action:v(r)},{network:"linkedin",action:P(r)},{network:"email",action:x(r)},{network:"facebook",action:F(r)},{network:"whatsapp",action:O(r)},{network:"clipboard",onClick:()=>u()}]});async function u(){var r,s;try{await navigator.share({title:(r=t.content)==null?void 0:r.title,text:(s=t.content)==null?void 0:s.content,url:t.content.href})}catch{navigator.clipboard.writeText(t.content.href),n({type:_.SUCCESS,title:e("copied")})}}return(r,s)=>(c(),l(L,{absolute:""},{activator:i(()=>[w(r.$slots,"default")]),dropdown:i(()=>[z(T,{align:"left"},{default:i(()=>[(c(!0),b(D,null,g(p.value,a=>(c(),l(y,{key:a.network,href:a.action,target:"_blank",rel:"noopener noreferrer",onClick:a.onClick},{default:i(()=>[S(C(I(e)(`network.${a.network}`)),1)]),_:2},1032,["href","onClick"]))),128))]),_:1})]),_:3}))}});function d(o){const t=o;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{fr:{copied:e=>{const{normalize:n}=e;return n(["Le lien a été copié"])},share:e=>{const{normalize:n}=e;return n(["Partager"])},network:{twitter:e=>{const{normalize:n}=e;return n(["Partager sur X (Twitter)"])},linkedin:e=>{const{normalize:n}=e;return n(["Partager sur LinkedIn"])},facebook:e=>{const{normalize:n}=e;return n(["Partager sur Facebook"])},whatsapp:e=>{const{normalize:n}=e;return n(["Partager sur WhatsApp"])},email:e=>{const{normalize:n}=e;return n(["Partager par email"])},clipboard:e=>{const{normalize:n}=e;return n(["Copier le lien"])}}},en:{copied:e=>{const{normalize:n}=e;return n(["The link has beed copied to the clipboard"])},share:e=>{const{normalize:n}=e;return n(["Share"])},network:{twitter:e=>{const{normalize:n}=e;return n(["Share on X (Twitter)"])},linkedin:e=>{const{normalize:n}=e;return n(["Share on LinkedIn"])},facebook:e=>{const{normalize:n}=e;return n(["Share on Facebook"])},whatsapp:e=>{const{normalize:n}=e;return n(["Share on WhatsApp"])},email:e=>{const{normalize:n}=e;return n(["Share by email"])},clipboard:e=>{const{normalize:n}=e;return n(["Copy link"])}}}}})}typeof d=="function"&&d(E);export{E as _};
//# sourceMappingURL=ShareDropdown-DCmDaWmF.js.map