import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

enum CheckoutPaymentMethod {
  creditCard,
  appleOrGooglePay;

  Widget get iconWidget {
    if (this == CheckoutPaymentMethod.creditCard) return SvgPicture.asset("assets/icons/ic_card.svg");
    if (Platform.isIOS) return const Icon(Icons.apple, size: 24);
    return SvgPicture.asset("assets/icons/ic_google.svg", width: 20, height: 20);
  }

  String get stringId {
    if (this == CheckoutPaymentMethod.creditCard) return "generic_credit_card";
    if (Platform.isIOS) return "generic_apple_pay";
    return "generic_google_pay";
  }
}