import '../../contracts/script_widget.dart';

abstract class ScriptWidgetRuntime {
  Future<ScriptWidgetManifest> inspectWidget(String scriptSource);

  Future<ScriptWidgetManifest> loadWidget(String scriptSource);

  bool isWidgetLoaded(String widgetId);

  Future<Object?> invokeModuleFunction(
    String widgetId,
    String functionName,
    Map<String, Object?> params,
  );

  Future<void> unloadWidget(String widgetId);

  Future<void> dispose();
}
