import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'message_model.dart';

final messageListProvider = FutureProvider<List<MessageModel>>((ref) async {
  // 模拟网络延迟，使骨架屏可见
  await Future.delayed(const Duration(milliseconds: 1000));
  return MessageModel.mockMessages;
});

final unreadCountProvider = Provider<int>((ref) {
  return MessageModel.mockMessages.where((m) => !m.isRead).length;
});
