import React from 'react'; interface Prayer { id: string; text: string; type: 'prayer' | 'praise'; } interface SharePrayerProps { prayer: Prayer; } export default function SharePrayer({ prayer }: SharePrayerProps) { const shareText = `🙏 ${prayer.type === 'prayer' ? 'Prayer' : 'Praise'}: ${prayer.text.substring(0, 100)}${prayer.text.length > 100 ? '...' : ''}`; const shareUrl = window.location.href; const shareToTwitter = () => { const url = `https://twitter.com/intent/tweet?text=${encodeURIComponent(shareText)}&url=${encodeURIComponent(shareUrl)}`; window.open(url, '_blank', 'width=600,height=400'); }; const shareToFacebook = () => { const url = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}"e=${encodeURIComponent(shareText)}`; window.open(url, '_blank', 'width=600,height=400'); }; const shareToWhatsApp = () => { const url = `https://wa.me/?text=${encodeURIComponent(shareText + ' ' + shareUrl)}`; window.open(url, '_blank', 'width=600,height=400'); }; const copyToClipboard = async () => { try { await navigator.clipboard.writeText(`${shareText} ${shareUrl}`); alert('Prayer copied to clipboard!'); } catch (err) { console.error('Failed to copy: ', err); } }; return (