import { BackgroundActionDefinition, BackgroundActionRunContext, ManifestEditorTag } from "@manifest-editor/shell";

//#region rolldown:runtime
//#endregion
//#region src/plugin.d.ts
declare const _default: {
  id: string;
  label: string;
  description: string;
  author: string;
  official: true;
  defaultEnabled: false;
  tags: string[];
  supports: {
    apps: string[];
    projectTypes: "Manifest"[];
  };
};
//#endregion
//#region src/canvas-image.d.ts
type CanvasImageForClassification = {
  url: string;
  blob: Blob;
};
//#endregion
//#region src/ocr-difficulty.d.ts
declare const OCR_DIFFICULTY_TAG_TYPE = "ocr-difficulty";
type OcrDifficultyId = "easy" | "medium" | "difficult";
type OcrDifficultyClass = {
  id: OcrDifficultyId;
  index: number;
  label: string;
  backgroundColor: string;
  textColor: string;
};
type OcrDifficultyPrediction = OcrDifficultyClass & {
  score: number;
};
type OcrClassifierRun = {
  scores: number[];
  prediction: OcrDifficultyPrediction;
  inferenceMs: number;
};
declare const OCR_DIFFICULTY_CLASSES: OcrDifficultyClass[];
declare function selectOcrDifficulty(scores: ArrayLike<number>): OcrDifficultyPrediction;
declare function createOcrDifficultyTag(prediction: OcrDifficultyPrediction): ManifestEditorTag;
declare function formatOcrScore(score: number): string;
//#endregion
//#region src/background-action.d.ts
declare const OCR_CLASSIFICATION_ACTION_ID = "@manifest-editor/ocr-classification/classify-canvases";
type OcrCanvasClassification = {
  canvasId: string;
  canvasLabel: string;
  tagId: string;
  label: string;
  score: number;
  scores: number[];
  imageUrl: string;
};
type OcrCanvasClassificationSkip = {
  canvasId: string;
  canvasLabel: string;
  reason: string;
};
type OcrClassificationActionResult = {
  total: number;
  classified: number;
  skipped: number;
  counts: Record<string, number>;
  classifications: OcrCanvasClassification[];
  skippedCanvases: OcrCanvasClassificationSkip[];
};
type OcrClassificationActionDependencies = {
  prepareClassifier?: () => Promise<void>;
  getCanvasImage?: (ctx: BackgroundActionRunContext, canvas: any) => Promise<CanvasImageForClassification | null>;
  classifyImage?: (image: Blob) => Promise<OcrClassifierRun>;
};
declare function createOcrClassificationBackgroundAction(dependencies?: OcrClassificationActionDependencies): BackgroundActionDefinition;
declare namespace index_d_exports {
  export { OCR_CLASSIFICATION_ACTION_ID, OCR_DIFFICULTY_CLASSES, OCR_DIFFICULTY_TAG_TYPE, OcrCanvasClassification, OcrCanvasClassificationSkip, OcrClassificationActionDependencies, OcrClassificationActionResult, OcrClassifierRun, OcrDifficultyClass, OcrDifficultyId, OcrDifficultyPrediction, backgroundActions, createOcrClassificationBackgroundAction, createOcrDifficultyTag, _default as default, formatOcrScore, selectOcrDifficulty };
}
declare const backgroundActions: BackgroundActionDefinition[];
//#endregion
export { selectOcrDifficulty as _, OcrCanvasClassificationSkip as a, createOcrClassificationBackgroundAction as c, OcrClassifierRun as d, OcrDifficultyClass as f, formatOcrScore as g, createOcrDifficultyTag as h, OcrCanvasClassification as i, OCR_DIFFICULTY_CLASSES as l, OcrDifficultyPrediction as m, index_d_exports as n, OcrClassificationActionDependencies as o, OcrDifficultyId as p, OCR_CLASSIFICATION_ACTION_ID as r, OcrClassificationActionResult as s, backgroundActions as t, OCR_DIFFICULTY_TAG_TYPE as u, _default as v };
//# sourceMappingURL=index-CwtpxPp2.d.ts.map