1import{l as S,_ as b}from"./Bj_YJ_pj.js";import y from"./Bzzpn_nm.js";import x from"./DZtARarq.js";import{_ as g,j as n,g as r,h as c,i as p,q as t,z as _,l as h,F as u,D as O,m as d,p as k,A as L,x as v,v as U}from"./WSThmNLm.js";const B={facebook:{type:String,default(){return[]}},instagram:{type:String,default(){return[]}},items:{type:Array,default(){return[]}}},T={name:"ShareOnSocial",components:{linkCircle:S},props:B,data(){return{showShareOptions:!1,linkCopied:!1}},computed:{buttonText(){return this.linkCopied?"link copied":"copy link"},currentUrl(){return window.location.href}},methods:{handleClick(){var o;(navigator==null?void 0:navigator.clipboard).writeText((o=window==null?void 0:window.location)==null?void 0:o.href),this.linkCopied=!0},handleLinkClick(e){e==="email"&&this.handleEmail()},handleClose(){this.showShareOptions=!1,this.linkCopied=!1},socialShareUrl(e){let o="";switch(e){case"facebook":o="https://www.facebook.com/sharer/sharer.php?u=";break;case"x":o="https://twitter.com/intent/tweet?url=";break;case"linkedin":o="https://www.linkedin.com/sharing/share-offsite/?url=";break;default:return null}return o+encodeURI(this.currentUrl)},handleEmail(){const e=`mailto:?body=${encodeURIComponent(this.currentUrl)}`;window.location.href=e}}},N={class:"share-on-social"},V={key:1,class:"share-on-social__share-items"},E={class:"share-on-social__follow-copy-btn__text"};function F(e,o,I,z,s,a){const l=b,m=y,f=x,w=v,C=U;return n(),r("div",N,[c(C,{class:"share-on-social__container"},{default:p(()=>[t("div",{class:_(["share-on-social__share",{"share-on-social-grid":s.showShareOptions,"share-on-social-extra-padding":s.showShareOptions}])},[o[1]||(o[1]=t("span",{class:"share-on-social__share-text"},"Share:",-1)),s.showShareOptions?(n(),r("div",V,[(n(!0),r(u,null,O(e.items,i=>(n(),h(l,{key:i.platform,icon:i.platform.toLowerCase(),url:a.socialShareUrl(i.platform.toLowerCase()),onClick:a.handleLinkClick},null,8,["icon","url","onClick"]))),128))])):(n(),h(l,{key:0,icon:"share",onClick:o[0]||(o[0]=i=>s.showShareOptions=!0)}))],2),t("div",{class:_(["share-on-social__follow",{"share-on-social-center":s.showShareOptions,"share-on-social-extra-padding":s.showShareOptions}])},[s.showShareOptions?(n(),r(u,{key:1},[c(f,{class:_(["share-on-social__follow-copy-btn",{"share-on-social-link-copied":s.linkCopied}]),onClick:a.handleClick},{default:p(()=>[t("span",E,[c(m,{"icon-name":"link"}),k(" "+L(a.buttonText),1)])]),_:1},8,["class","onClick"]),c(w,{class:"share-on-social__follow-close",onClick:a.handleClose},{default:p(()=>o[3]||(o[3]=[k("Close")])),_:1},8,["onClick"])],64)):(n(),r(u,{key:0},[o[2]||(o[2]=t("span",{class:"share-on-social__follow-text"},"Follow us:",-1)),e.facebook?(n(),h(l,{key:0,icon:"facebook",url:e.facebook},null,8,["url"])):d("",!0),e.instagram?(n(),h(l,{key:1,icon:"instagram",url:e.instagram},null,8,["url"])):d("",!0)],64))],2)]),_:1})])}const q=g(T,[["render",F]]);export{q 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.