import 'package:share_plus/share_plus.dart';

class ShareService {
  Future<void> share({
    required String text,
    String? subject,
  }) async {
    await Share.share(text, subject: subject);
  }

  Future<void> shareMatchInvite(String matchId, String gameType) async {
    final url = 'https://el3ab-player.caprover.al-arcade.com/match/$matchId';
    await share(
      text: 'تعال نلعب $gameType على EL3AB! 🎮\n$url',
      subject: 'دعوة لعب على EL3AB',
    );
  }

  Future<void> shareProfile(String userId, String playerName) async {
    final url = 'https://el3ab-player.caprover.al-arcade.com/profile/$userId';
    await share(
      text: 'شوف بروفايل $playerName على EL3AB 👑\n$url',
      subject: 'بروفايل $playerName',
    );
  }
}
