import 'package:equatable/equatable.dart';

class GlobalState extends Equatable {
  final String currentPrice;
  final String priceChange24h;
  final String totalDistributed;
  final String totalBurned;
  final String circulationPool;
  final String networkContribution;
  final int eraNumber;
  final String remainingDistribution;
  final DateTime updatedAt;

  const GlobalState({
    required this.currentPrice,
    required this.priceChange24h,
    required this.totalDistributed,
    required this.totalBurned,
    required this.circulationPool,
    required this.networkContribution,
    required this.eraNumber,
    required this.remainingDistribution,
    required this.updatedAt,
  });

  bool get isPriceUp => (double.tryParse(priceChange24h) ?? 0) >= 0;

  @override
  List<Object?> get props => [
        currentPrice,
        priceChange24h,
        totalDistributed,
        totalBurned,
        circulationPool,
        networkContribution,
        eraNumber,
        updatedAt,
      ];
}
