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

class AppThemeIcons extends ThemeExtension<AppThemeIcons> {
  final String icSplash;
  final String icArrowLeft;
  final String icHome;
  final String icDiscover;
  final String icCart;
  final String icCart1;
  final String icTransactions;
  final String icProfile;

  AppThemeIcons({
    required this.icSplash,
    required this.icArrowLeft,
    required this.icHome,
    required this.icDiscover,
    required this.icCart,
    required this.icTransactions,
    required this.icProfile,
    required this.icCart1,
  });

  static AppThemeIcons light = AppThemeIcons(
    icSplash: AppLightSvgs.icSplash,
    icArrowLeft: AppLightSvgs.icArrowLeft,
    icHome: AppLightSvgs.icHome,
    icDiscover: AppLightSvgs.icDiscover,
    icCart: AppLightSvgs.icCart,
    icTransactions: AppLightSvgs.icTransactions,
    icProfile: AppLightSvgs.icProfile,
    icCart1: AppLightSvgs.icCart1,
  );

  static AppThemeIcons dark = AppThemeIcons(
    icSplash: AppDarkSvgs.icSplash,
    icArrowLeft: AppDarkSvgs.icArrowLeft,
    icHome: AppDarkSvgs.icHome,
    icDiscover: AppDarkSvgs.icDiscover,
    icCart: AppDarkSvgs.icCart,
    icTransactions: AppDarkSvgs.icTransactions,
    icProfile: AppDarkSvgs.icProfile,
    icCart1: AppDarkSvgs.icCart1,
  );

  @override
  ThemeExtension<AppThemeIcons> copyWith({
    String? icSplash,
    String? icArrowLeft,
    String? icHome,
    String? icDiscover,
    String? icCart,
    String? icCart1,
    String? icTransactions,
    String? icProfile,
  }) {
    return AppThemeIcons(
      icSplash: icSplash ?? this.icSplash,
      icArrowLeft: icArrowLeft ?? this.icArrowLeft,
      icHome: icHome ?? this.icHome,
      icDiscover: icDiscover ?? this.icDiscover,
      icCart: icCart ?? this.icCart,
      icTransactions: icTransactions ?? this.icTransactions,
      icProfile: icProfile ?? this.icProfile,
      icCart1: icCart ?? this.icCart1,
    );
  }

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