import { Pay } from './pay'
import { Wechat } from './wechat'
import { Balance } from './balance'

// 支付方式 wechat 0
enum PayWayEnum {
    // WECHAT = 0,
    // BALANCE = 1,
    // ALIPAY = 3

    //依据后台的更改枚举值
    WECHAT = 1, //微信支付
    ALIPAY = 2, //阿里支付
    BALANCE = 3 //余额支付
}

const balance = new Balance()
const wechat = new Wechat()

// 注入微信支付
Pay.inject(PayWayEnum[PayWayEnum.WECHAT], wechat)
// 注入余额支付
Pay.inject(PayWayEnum[PayWayEnum.BALANCE], balance)

// 创建支付
const pay = new Pay()
export { pay, PayWayEnum }
