// ============================================================
// IssuerProvider — 发行方 Riverpod Providers
// ============================================================

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

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

final issuerCouponsProvider = FutureProvider.autoDispose((ref) async {
  final api = ApiClient.instance;
  final resp = await api.get('/api/v1/issuers/me/coupons');
  return resp.data['data'];
});
