import{r as e,d as i,B as o,h as t}from"./p-03169580.js";import{C as r}from"./p-f9010236.js";import"./p-bd8b186e.js";const s="fireenjin-share ion-item:hover{cursor:pointer}fireenjin-share .share-twitter ion-icon{color:#1da1f3}fireenjin-share .share-twitter ion-icon svg{fill:#1da1f3}fireenjin-share .share-twitter:hover .item{color:#1da1f3}fireenjin-share .share-facebook ion-icon{color:#3b5998}fireenjin-share .share-facebook ion-icon svg{fill:#3b5998}fireenjin-share .share-facebook:hover .item{color:#3b5998}fireenjin-share .share-google ion-icon{color:#dd4b38}fireenjin-share .share-google ion-icon svg{fill:#dd4b38}fireenjin-share .share-google:hover .item{color:#dd4b38}";let n=class{constructor(o){e(this,o);this.fireenjinShareClose=i(this,"fireenjinShareClose",7)}openPopup(e,i){e.preventDefault();let o;if(i==="facebook"){o=`https://www.facebook.com/dialog/share?app_id=${this.facebookAppId}&display=popup&href=${this.url}`}else if(i==="google"){o=`https://plus.google.com/share?url=${this.url}`}else if(i==="twitter"){o=`https://twitter.com/intent/tweet?url=${this.url}&text=${this.text}`}else{return false}this.fireenjinShareClose.emit({event:e,type:i});window.open(o,"Share",i==="google"?"height=600,width=400":"height=400,width=600")}componentDidLoad(){if(!(o===null||o===void 0?void 0:o.isBrowser))return;{new r(this.copyItemEl)}}render(){return t("ion-list",null,t("ion-item",{lines:this.lines,class:"share-twitter",onClick:e=>this.openPopup(e,"twitter")},t("ion-icon",{slot:"end",name:"logo-twitter"}),"Share on Twitter"),t("ion-item",{lines:this.lines,class:"share-facebook",onClick:e=>this.openPopup(e,"facebook")},t("ion-icon",{slot:"end",name:"logo-facebook"}),"Share on Facebook"),t("ion-item",{lines:this.lines,ref:e=>this.copyItemEl=e,class:"share-clipboard","data-clipboard-text":this.url},t("ion-icon",{slot:"end",name:"clipboard"}),"Copy to Clipboard"))}};n.style=s;export{n as fireenjin_share};
//# sourceMappingURL=p-e3b75983.entry.js.map