// ============================================================
// ProfileProvider — 用户资料 Riverpod Providers
// ============================================================

import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../../core/network/api_client.dart';

// ── 用户资料 ──────────────────────────────────────────────────

final userProfileProvider = FutureProvider.autoDispose((ref) async {
  final api = ApiClient.instance;
  final resp = await api.get('/api/v1/users/me');
  return resp.data['data'] as Map<String, dynamic>?;
});

// ── KYC 状态 ──────────────────────────────────────────────────

final kycStatusProvider = FutureProvider.autoDispose((ref) async {
  final api = ApiClient.instance;
  final resp = await api.get('/api/v1/users/kyc');
  return resp.data['data'] as Map<String, dynamic>?;
});

// ── 支付方式 ──────────────────────────────────────────────────

final paymentMethodsProvider = FutureProvider.autoDispose((ref) async {
  final api = ApiClient.instance;
  final resp = await api.get('/api/v1/users/payment-methods');
  return resp.data['data'];
});
