import { CSSProperties } from 'react';
export declare enum EftposEnum {
    /** 后端支付 - 仅支付  */
    Payo = "payo",
    /** 前端支付 */
    Tyro = "tyro",
    /** 后端支付 - 支付 + 退款  */
    Windcave = "windcave",
    Stripe = "stripe",
    Linkly = "linkly",
    /** 汇付天下 */
    Huifu = "huifu"
}
export declare enum StatusEnum {
    Init = "init",
    Loading = "loading",
    Warn = "warn",
    Fail = "fail",
    Success = "success",
    Pedding = "pedding",
    Resove = "resove",
    Reject = "reject",
    Question = "question"
}
export declare enum ModeEnum {
    /** 支付 */
    Pay = "pay",
    /** 完整支付 */
    FullPay = "fullPay",
    /** 退款 */
    Refund = "refund",
    /** 查询 */
    Query = "query"
}
/**
 * 崩溃恢复
 */
export declare enum RestoreEumn {
    /** 常规  */
    Normal = "normal",
    /** 恢复 */
    Restore = "restore"
}
/**
 * 订单状态
 */
export declare enum OrderEumn {
    /** 恢复  */
    Restore = "restore",
    /** 常规  */
    Normal = "normal",
    /** 成功 */
    Succeed = "succeed",
    /** 失败 */
    Failed = "failed",
    /** 等待 */
    Pending = "pending",
    /** 没有订单状态 */
    Null = "null"
}
export declare enum ClientEnum {
    /** 用户端 */
    User = "user",
    /** 商家端 */
    Merchant = "merchant"
}
export declare enum RouteEnum {
    /** 改价页 */
    Amount = "amount",
    /** 门店列表页 */
    DeviceList = "deviceList",
    /**支付页 */
    Pay = "pay"
}
export declare enum PayRouteEnum {
    Step = "step",
    Unset = "unset"
}
export declare type RouteType = `${RouteEnum}`;
export declare type PayRouteType = `${PayRouteEnum}`;
export declare type DeviceStatusType = `${EftposEnum}`;
export declare type StatusType = `${StatusEnum}`;
export declare type ModeType = `${ModeEnum}`;
export interface PosProps {
    /** 厂商类型 */
    type: DeviceStatusType;
    getApi: () => {
        [key: string]: (...agrn: unknown[]) => Promise<unknown>;
    };
    params: {
        [key: string]: unknown;
    };
    /** 回调 */
    onChangeStatus: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page' | 'print' | 'mark_tx_processed', params?: {
        [keys: string]: unknown;
    } | string, other?: any) => void;
    onChangeParams(...agrn: unknown[]): void;
    terminal: {
        network: boolean;
    };
    device?: {
        [key: string]: unknown;
    };
    mode: ModeEnum;
    tyroUrl?: string;
    tyroVersion?: string;
    source: 'normal' | 'restore';
    styles?: {
        device?: CSSProperties;
        [key: string]: CSSProperties | undefined;
    };
    isWebPos?: boolean;
}
export interface PayProps {
    api: ReturnType<PosProps['getApi']>;
    onChange: PosProps['onChangeStatus'];
    className?: string;
}
export declare type Amount = {
    name: string;
    /** 订单金额 */
    money: number;
    /** 上一轮操作订单金额 */
    amount: number;
    /** 金额单位 */
    symbol: string;
    /** 手续费-百分率 */
    surRate: number;
    /** 手续费-是否开启 */
    surMoney: number;
    /** 手续费-是否存在 */
    surcharge: boolean;
    /** 是否使用原始手续费 */
    useOriginSurcharge: boolean;
};
export declare type PayAmount = {
    /** 手续费-百分比-带百分号  例: 1% =》 数据为 0.01 */
    surPercentRate: string;
    /** 手续费-百分比-不带百分号  例:1%  =》 数据为 1 */
    surRate: string;
    /** 手续费-比例金额   amount * surPercentRate  */
    surRateMoney: string;
    /** 手续费-固定金额 */
    surMoney: string;
    /** 手续费 =   surPercentRate + surMoney */
    surcharge: string;
    /** 支付金额 (不包含手续费) */
    amount: string;
    /** 支付总金额 =  amount + surcharge */
    total: string;
    /** 订单金额  */
    sourceAmount: string;
    /** 支付总金额带单位  + 单位 */
    totalUnit: string;
};
export declare enum PayStatus {
    'Success' = "200",
    /** 未生成交易记录 */
    'NoPay' = "4004",
    /** 配对失效 */
    'PairingFailure' = "606020",
    /** 支付失败 */
    'Unknown' = "701000",
    /** 交易请求超时 */
    'Timeout' = "701001",
    /** 支付失败（汇付天下） */
    'PaymentFailed' = "701002",
    /** 繁忙 EFTPOS终端暂时不可用，因为EFTPOS正在处理另一个请求。 */
    'PayOtherEftposFailed' = "701003",
    /** 购物者没有出示卡片/卡片金额不足/在线拒绝/卡已过期/卡被锁定 */
    'PayCardErrorFailed' = "701004",
    /** 断网 向EFTPOS发送消息失败。可能有网络问题，也可能没有连接websocket。 */
    'NoNetWork' = "701005",
    /** 交易等待超时 */
    'PayTimeout' = "701006",
    /** 连接失败 */
    'SocketError' = "701007",
    /** 银行拒绝 */
    'PayBankRefuses' = "701008",
    /** 签名拒绝 */
    'SignatureDeclined' = "701009",
    /** 配置参数错误 */
    'UserConfigError' = "701010"
}
export interface ActionProps {
    onChange: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page', params?: {
        [key: string]: unknown;
    } | string) => void;
    api: {
        [key: string]: (...agrn: unknown[]) => Promise<unknown>;
    };
    className?: string;
    isMobile?: boolean;
    formatAmount: (amount: number | string, precision: number, symbol: string) => string;
}
