import 'package:flutter/material.dart';

Widget getBankLogo(String? bankName, BuildContext context) {
  if (bankName != null && bankName.toLowerCase().contains('state bank of')) {
    return Image.asset(
      'assets/images/sbi_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('kangra central')) {
    return Image.asset(
      'assets/images/logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('hdfc')) {
    return Image.asset(
      'assets/images/hdfc_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('icici')) {
    return Image.asset(
      'assets/images/icici_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('uco')) {
    return Image.asset(
      'assets/images/uco_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null &&
      bankName.toLowerCase().contains('punjab national bank')) {
    return Image.asset(
      'assets/images/pnb_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('axis')) {
    return Image.asset(
      'assets/images/axisBank_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('baroda')) {
    return Image.asset(
      'assets/images/bankofBaroda_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('canara bank')) {
    return Image.asset(
      'assets/images/canaraBank_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('kotak')) {
    return Image.asset(
      'assets/images/kotak_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('bank of india')) {
    return Image.asset(
      'assets/images/boi_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('yes')) {
    return Image.asset(
      'assets/images/yes_bank_logo.png',
      width: 40,
      height: 40,
    );
  }
  if (bankName != null && bankName.toLowerCase().contains('ipsbank') ||
      bankName != null && bankName.toLowerCase().contains('india post')) {
    return Image.asset(
      'assets/images/ipos_logo.png',
      width: 40,
      height: 40,
    );
  } else {
    return Icon(
      Icons.account_balance,
      size: 40,
      color: Theme.of(context).colorScheme.outline,
    );
  }
}
