import 'dart:typed_data';

import 'ocr/ocr_backends.dart';

/// Local OCR entry point. Delegates to a pluggable backend (embedded ONNX
/// recognition when a model is bundled, otherwise the native platform OCR).
///
/// The static API is kept for back-compat with [OcrService].
class OcrEngine {
  /// Recognize text from a PNG image. Returns null when unavailable or empty.
  static Future<String?> recognizeImage(Uint8List pngBytes) {
    return OcrBackends.recognize(pngBytes);
  }
}
