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

// 支付方式 1-微信 2-余额
enum PayWayEnum {
    WECHAT = 1,
    BALANCE = 2,
    ALIPAY = 3
}

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

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

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