import { WebSocialShareWithTextAttributes } from '../types/web-social-share-attributes' ; import { shareEncodedUrl , staticOpenNewWindow } from './utils' ; export const telegram = async ( attrs ) => { let urlString = `https://t.me/share/url?url=${ shareEncodedUrl ( attrs . socialShareUrl ) }` ; if ( attrs . socialShareText ) { urlString += `&text=${ encodeURIComponent ( attrs . socialShareText ) }` ; } staticOpenNewWindow ( urlString ) ; } ;