import{_ as f,o as n,c as s,a as r,p as d,d as l,l as u,F as w,x as y,y as _,s as b,f as k}from"./BDipKYNj.js";import{_ as x}from"./WebShareLink-BsyPwWaZ.mjs";const I={props:{contentId:{type:Number,required:!0},title:{type:String,required:!0},description:{type:String},iconWidth:{type:Number,default:40},useEmail:{type:Boolean,default:!0},path:{type:String,required:!0}},data(){return{shareNetworks:["facebook","linkedin","twitter","pinterest"],fullURL:"",showAllIcons:!1}},computed:{filterShareNetworks(){return this.showAllIcons?this.shareNetworks:this.shareNetworks.slice(0,4)},iconElementWidth(){return 3/5*this.iconWidth},iconWrapperStyle(){return{padding:`${this.iconWidth/5}px`}},mailToLink(){return`mailto:?subject=${this.title}&body=${this.fullURL}%0D%0A${this.description??""}`}},mounted(){var h;this.fullURL=window.location.hostname+this.path;const e=(h=this.$ss.contentStyle)==null?void 0:h.socialShareLinks;if(e!==void 0){this.shareNetworks=[];for(let i=0;i<(e==null?void 0:e.length);i++){const m=e[i];this.shareNetworks.push(m)}}},methods:{showAll(){this.showAllIcons=!this.showAllIcons},getIcon(e){return e==="flipboard"?"simple-icons:flipboard":e==="twitter"?"fa6-brands:x-twitter":`mdi:${e==null?void 0:e.toLowerCase()}`}}},N={class:"ebm-share-wrapper"},S={key:0,class:"ebm-share-item printer-icon"},W=["href"],g={key:1,class:"ebm-share-item email-icon"},L=["href"],A={key:2,class:"ebm-plus-icon"};function E(e,h,i,m,o,t){const c=k,p=x;return n(),s("div",N,[r("ul",{class:_(["ebm-share-list",o.showAllIcons?"expanded":"collapsed"])},[i.contentId?(n(),s("li",S,[r("a",{href:`/print/content/${i.contentId}`,target:"_blank"},[r("div",{style:d(t.iconWrapperStyle)},[l(c,{icon:"mdi:printer","icon-color":"white",width:t.iconElementWidth},null,8,["width"])],4)],8,W)])):u("",!0),i.useEmail?(n(),s("li",g,[r("a",{href:t.mailToLink},[r("div",{style:d(t.iconWrapperStyle)},[l(c,{icon:"mdi:email","icon-color":"white",width:t.iconElementWidth},null,8,["width"])],4)],8,L)])):u("",!0),(n(!0),s(w,null,y(t.filterShareNetworks,a=>(n(),s("li",{key:a,class:_(`ebm-share-item ${a}-icon`)},[l(p,{network:a,url:o.fullURL,title:i.title,description:i.description},{default:b(()=>[r("div",{style:d(t.iconWrapperStyle)},[l(c,{icon:t.getIcon(a),"icon-color":"white",width:t.iconElementWidth},null,8,["icon","width"])],4)]),_:2},1032,["network","url","title","description"])],2))),128)),o.shareNetworks.length>4?(n(),s("li",A,[l(c,{icon:o.showAllIcons?"bxs:left-arrow":"bxs:right-arrow",width:t.iconElementWidth,onClick:t.showAll},null,8,["icon","width","onClick"])])):u("",!0)],2)])}const B=f(I,[["render",E],["__scopeId","data-v-fe74701c"]]);export{B as _};