import type {
  RegexExecutionRequest,
  RegexExecutionResult,
  RegexReplacementRequest,
  RegexReplacementResult,
} from "../model/match";
import type { RegexEngineInfo, RegexFlavourId } from "../model/flavour";

export interface RegexEngineAdapter {
  readonly flavour: RegexFlavourId;
  load(): Promise<RegexEngineInfo>;
  execute(request: RegexExecutionRequest): Promise<RegexExecutionResult>;
  replace(request: RegexReplacementRequest): Promise<RegexReplacementResult>;
  terminate(): void;
}
