import type { SignResult } from './SignResult';
import type { SdkEvent } from './SdkEvent';
class BjcCov {
    coverage: {
        [key: string]: string | number;
    };
    constructor(covData: object) {
        const gcv = "__coverage__";
        let coverage = globalThis[gcv] || (globalThis[gcv] = {});
        if (!coverage[covData.path] && true) {
            coverage[covData.path] = covData;
        }
        this.coverage = coverage[covData.path];
    }
    instrumentFunction(func: number) {
        this.coverage.functions[func].count++;
        this.coverage.functions[func].regions[0].count++;
    }
    instrumentRegion(func: number, region: number) {
        this.coverage.functions[func].regions[region].count++;
    }
    instrumentReturn(func: number, retIdx: number) {
        this.coverage.functions[func].returnes[retIdx].count++;
    }
    instrumentBranch(func: number, branch: number, trueOrFalse: boolean) {
        if (trueOrFalse) {
            this.coverage.functions[func].branches[branch].trueCount++;
            for (let r of Object.values(this.coverage.functions[func].branches[branch].group)) {
                if (r !== branch) {
                    this.coverage.functions[func].branches[r as number].falseCount++;
                }
            }
        }
        else {
            this.coverage.functions[func].branches[branch].falseCount++;
        }
    }
}
let bjccovms5u83rr = new BjcCov({ version: "bjc v1.0.0", versionCode: 10000, path: "tencentqianwebview/src/main/ets/model/SignCallback.ets", hash: "514b7e0646ab35edb5f64d690f5d820d285ad1c1c46cca3df537005711ca7b8a", lineCnt: 37, count: 0, projectPath: "", functions: { 0: { name: "anonymous_0", count: 0, regions: { 0: { startLoc: { line: 9, col: 28 }, endLoc: { line: 9, col: 56 }, count: 0, ignored: 0 } }, branches: {}, ignored: 0, index: 0 }, 1: { name: "anonymous_1", count: 0, regions: { 0: { startLoc: { line: 12, col: 26 }, endLoc: { line: 12, col: 51 }, count: 0, ignored: 0 } }, branches: {}, ignored: 0, index: 1 }, 2: { name: "anonymous_2", count: 0, regions: { 0: { startLoc: { line: 20, col: 37 }, endLoc: { line: 20, col: 47 }, count: 0, ignored: 0 } }, branches: {}, ignored: 0, index: 2 }, 3: { name: "anonymous_3", count: 0, regions: { 0: { startLoc: { line: 29, col: 30 }, endLoc: { line: 29, col: 73 }, count: 0, ignored: 0 } }, branches: {}, ignored: 0, index: 3 }, 4: { name: "anonymous_4", count: 0, regions: { 0: { startLoc: { line: 36, col: 33 }, endLoc: { line: 36, col: 77 }, count: 0, ignored: 0 } }, branches: {}, ignored: 0, index: 4 } }, exeLine: { 0: 1, 1: 2, 2: 9, 3: 12, 4: 20, 5: 29, 6: 36 } });
/**
 * `qianapp://` 协议命中时触发，SDK 自动取消该次 WebView 导航。
 *
 * 业务方在此决定下一步动作（关闭页面 / 跳转其他流程 / 留在原地 等）。
 */
export type OnSignResult = (result: SignResult) => void;
/** 容器层非协议事件回调，可选实现。 */
export type OnSdkEvent = (event: SdkEvent) => void;
/**
 * 渲染进程连续崩溃且 SDK 放弃自动恢复（永久白屏终态）时触发。
 *
 * 与 `OnSdkEvent` 的 `RenderProcessGoneEvent` 语义互补：后者是「每次崩溃」，
 * 本回调是「已放弃恢复的终态」。宿主据此显示错误页 / 返回 / 提示重试。
 */
export type OnRenderUnrecoverable = () => void;
/**
 * H5 标题 / 可后退状态变化回调（`onPageEnd` 快照）。
 *
 * 供嵌入模式（`TencentQianWebViewComponent`）宿主自绘顶栏更新标题与返回按钮禁用态。
 * 注意：`canGoBack` 为整页导航快照，SPA 软路由不刷新；需要实时值请用
 * `TencentQianWebViewController.canGoBack()`。
 */
export type OnTitleChanged = (title: string, canGoBack: boolean) => void;
/**
 * 加载进度变化回调。`progress` 取值 0~100；`visible` 表示进度条是否应显示。
 *
 * 供嵌入模式（`TencentQianWebViewComponent`）宿主自绘进度条。
 */
export type OnProgressChanged = (progress: number, visible: boolean) => void;
