// Copyright 2025-present 650 Industries. All rights reserved.

#import <ExpoModulesCore/EXWorkletRuntime.h>
#import <ExpoModulesCore/EXJavaScriptSerializable.h>

NS_SWIFT_NAME(WorkletExecutor)
@interface EXWorkletExecutor : NSObject

/**
 Schedules the worklet to be executed asynchronously on the given runtime.
 */
+ (void)schedule:(nonnull EXJavaScriptSerializable *)serializable
         runtime:(nonnull EXWorkletRuntime *)runtime;

/**
 Executes the worklet synchronously on the given runtime.
 */
+ (void)execute:(nonnull EXJavaScriptSerializable *)serializable
        runtime:(nonnull EXWorkletRuntime *)runtime;

/**
 Schedules the worklet to be executed asynchronously on the given runtime with arguments.
 */
+ (void)schedule:(nonnull EXJavaScriptSerializable *)serializable
         runtime:(nonnull EXWorkletRuntime *)runtime
       arguments:(nonnull NSArray *)arguments;

/**
 Executes the worklet synchronously on the given runtime with arguments.
 */
+ (void)execute:(nonnull EXJavaScriptSerializable *)serializable
        runtime:(nonnull EXWorkletRuntime *)runtime
      arguments:(nonnull NSArray *)arguments;

@end
