
import 'dart:ffi';

import 'classify_photo_platform_interface.dart';

class ClassifyPhoto {
  Future<String?> getPlatformVersion() {
    return ClassifyPhotoPlatform.instance.getPlatformVersion();
  }

  Future<List<Map<String, dynamic>>?> getPhoto() {
    return ClassifyPhotoPlatform.instance.getPhoto();
  }

  Future<Map<String, int>> getStorageInfo() {
    return ClassifyPhotoPlatform.instance.getStorageInfo();
  }

  Future<bool> checkTrialEligibility(String appleId) {
    return ClassifyPhotoPlatform.instance.checkTrialEligibility(appleId);
  }

  Future<Map<String, dynamic>> getPhotoExif(String filePath) async {
    try {
      return await ClassifyPhotoPlatform.instance.getPhotoExif(filePath);
    } catch (e) {
      print('获取照片 EXIF 信息失败: $e');
      return {};
    }
  }

  Future<void> finishTransaction() {
    return ClassifyPhotoPlatform.instance.finishTransaction();
  }
}
