import 'package:flutter/material.dart';
import 'package:food_delivery_client/food_delivery_client.dart';

class AppThemeColors extends ThemeExtension<AppThemeColors> {
  final Color onBoardingColor;
  final Color boxShadow;
  final Color iconColor;
  final Color buttonInactiveColor;
  final Color borderColor;
  final Color inActiveColor;
  final Color inActiveColor1;
  final Color inActiveColor2;
  final Color rippleColor;

  AppThemeColors({
    required this.onBoardingColor,
    required this.boxShadow,
    required this.iconColor,
    required this.buttonInactiveColor,
    required this.borderColor,
    required this.inActiveColor,
    required this.inActiveColor1,
    required this.inActiveColor2,
    required this.rippleColor,
  });

  static AppThemeColors light = AppThemeColors(
    onBoardingColor: AppColors.cFFFFFF,
    boxShadow: AppColors.cD6D4D4,
    buttonInactiveColor: AppColors.cE2E4EA,
    iconColor: AppColors.cFFFFFF,
    borderColor: AppColors.cE2E4EA,
    inActiveColor: AppColors.cE2E4EA,
    inActiveColor1: AppColors.cA9A9A9,
    inActiveColor2: AppColors.cE5E7EB,
    rippleColor: AppColors.c9FB6FA,
  );

  static AppThemeColors dark = AppThemeColors(
    onBoardingColor: AppColors.c131720,
    boxShadow: AppColors.c524242,
    buttonInactiveColor: AppColors.c292F3D,
    iconColor: AppColors.c131720,
    borderColor: AppColors.c292F3D,
    inActiveColor: AppColors.c292F3D,
    inActiveColor1: AppColors.c626262,
    inActiveColor2: AppColors.c292F3D,
    rippleColor: AppColors.cFF6F00,
  );

  @override
  ThemeExtension<AppThemeColors> copyWith({
    Color? onBoardingColor,
    Color? boxShadow,
    Color? iconColor,
    Color? buttonInactiveColor,
    Color? borderColor,
    Color? inActiveColor,
    Color? inActiveColor1,
    Color? inActiveColor2,
    Color? rippleColor,
  }) {
    return AppThemeColors(
      onBoardingColor: onBoardingColor ?? this.onBoardingColor,
      boxShadow: boxShadow ?? this.boxShadow,
      iconColor: iconColor ?? this.iconColor,
      buttonInactiveColor: buttonInactiveColor ?? this.buttonInactiveColor,
      borderColor: borderColor ?? this.borderColor,
      inActiveColor: inActiveColor ?? this.inActiveColor,
      inActiveColor1: inActiveColor1 ?? this.inActiveColor1,
      inActiveColor2: inActiveColor2 ?? this.inActiveColor2,
      rippleColor: rippleColor ?? this.rippleColor,
    );
  }

  @override
  ThemeExtension<AppThemeColors> lerp(
    covariant ThemeExtension<AppThemeColors>? other,
    double t,
  ) {
    if (other is! AppThemeColors) return this;
    return t < 0.5 ? this : other;
  }
}
