import '../../resource/assets.gen.dart';

class PayPlatform {
  static const int android = 1;
  static const int apple = 2;
}

class PayMethod {
  static const int alipay = 1;
  static const int wechat = 2;
  static const int apple = 3;
  static const int google = 4;
  static const int douYin = 5;
}

class Currency {
  static const String cny = "CNY";
  static const String usd = "USD";
}

class PayWayType {
  static const int paymentWayWechat = 1;
  static const int paymentWayWechatScan = 2;
  static const int paymentWayAlipay = 3;
  static const int paymentWayAlipayScan = 4;

  static const int unKnown = -1;
}

String getPaymentIconPath({required int payMethod, required int payPlatform}) {
  if (payPlatform == 1 && payMethod == 2) {
    return Assets.images.iconWechatPayment.path;
  } else if (payPlatform == 4 && payMethod == 2) {
    return Assets.images.iconWechatScanPayment.path;
  } else if (payPlatform == 1 && payMethod == 1) {
    return Assets.images.iconAlipayPayment.path;
  } else if (payPlatform == 4 && payMethod == 1) {
    return Assets.images.iconAlipayScanPayment.path;
  }
  return '';
}

int getPayWayType({required int payMethod, required int payPlatform}) {
  if (payPlatform == 1 && payMethod == 2) {
    return PayWayType.paymentWayWechat;
  } else if (payPlatform == 4 && payMethod == 2) {
    return PayWayType.paymentWayWechatScan;
  } else if (payPlatform == 1 && payMethod == 1) {
    return PayWayType.paymentWayAlipay;
  } else if (payPlatform == 4 && payMethod == 1) {
    return PayWayType.paymentWayAlipayScan;
  }
  return PayWayType.unKnown;
}
