#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>

@interface RCT_EXTERN_MODULE(AudioAnalysisCore, NSObject)

RCT_EXTERN_METHOD(extractWaveform:(NSString *)uri
                  pointsPerSecond:(NSNumber *)pointsPerSecond
                  startTimeMs:(NSNumber *)startTimeMs
                  endTimeMs:(NSNumber *)endTimeMs
                  decodingOptions:(NSDictionary *)decodingOptions
                  resolver:(RCTPromiseResolveBlock)resolver
                  rejecter:(RCTPromiseRejectBlock)rejecter)

RCT_EXTERN_METHOD(analyzeAudio:(NSString *)uri
                  segmentDurationMs:(NSNumber *)segmentDurationMs
                  startTimeMs:(NSNumber *)startTimeMs
                  endTimeMs:(NSNumber *)endTimeMs
                  features:(NSDictionary *)features
                  decodingOptions:(NSDictionary *)decodingOptions
                  resolver:(RCTPromiseResolveBlock)resolver
                  rejecter:(RCTPromiseRejectBlock)rejecter)

+ (BOOL)requiresMainQueueSetup
{
  return NO;
}

@end
