import 'package:flutter/material.dart';

class ExpiryColors extends ThemeExtension<ExpiryColors> {
  const ExpiryColors({
    required this.expired,
    required this.monthLess,
  });

  final Color? expired;
  final Color? monthLess;

  @override
  ExpiryColors copyWith({Color? brandColor, Color? danger}) {
    return ExpiryColors(
      expired: brandColor ?? expired,
      monthLess: danger ?? monthLess,
    );
  }

  @override
  ExpiryColors lerp(ExpiryColors? other, double t) {
    if (other is! ExpiryColors) {
      return this;
    }
    return ExpiryColors(
      expired: Color.lerp(expired, other.expired, t),
      monthLess: Color.lerp(monthLess, other.monthLess, t),
    );
  }
}
