import { EftposEnum } from "./const";
import getPayoInitState from "./payo/const";
import getTyroInitState from "./tyro/const";
import getWindcaveInitState from "./windcave/const";
import getLinklyInitState from "./linkly/const";
import getMx51InitState from "./mx51/const";
export { getAmonunt } from "./helper";
export { default as Payo } from "./payo";
export { default as Windcave } from "./windcave/windcave";
export { default as Tyro } from "./tyro";
export { default as Linkly } from "./linkly";
export { default as Mx51 } from "./mx51";
export var getInitState = function getInitState(type, params) {
  switch (type) {
    case EftposEnum.Payo:
      return getPayoInitState(params);
    case EftposEnum.Windcave:
      return getWindcaveInitState(params);
    case EftposEnum.Tyro:
      return getTyroInitState(params);
    case EftposEnum.Linkly:
      return getLinklyInitState(params);
    case EftposEnum.MX51:
      return getMx51InitState(params);
    default:
      throw new Error('未知的厂商类型');
  }
};
// 暂无定制业务
// export const getAmonunt = (store: State) => {
//   if (store.eftpos === EftposEnum.Payo) {
//     return getPayoAmonunt(store);
//   }
//   if (store.eftpos === EftposEnum.Windcave) {
//     return getWindcaveAmonunt(store);
//   }
//   if (store.eftpos === EftposEnum.Tyro) {
//     return getTyroAmonunt(store);
//   }
//   throw new Error('未知的厂商类型');
// };