export class ShareLogicHelper { private url: string; constructor(url: string) { this.url = url; } facebookShare(): void { window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(this.url)}`, '_blank'); } facebookMessengerShare(): void { window.open(`fb-messenger://share/?link=${encodeURIComponent(this.url)}`, '_blank'); } whatsAppShare(): void { window.open(`https://wa.me/?text=${encodeURIComponent(this.url)}`, '_blank'); } twitterShare(): void { window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(this.url)}`, '_blank'); } redditShare(): void { window.open(`https://www.reddit.com/submit?url=${encodeURIComponent(this.url)}`, '_blank'); } pinterestShare(): void { window.open(`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.url)}`, '_blank'); } linkedInShare(): void { window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(this.url)}`, '_blank'); } emailShare(): void { window.location.href = `mailto:?body=${encodeURIComponent(this.url)}`; } }