import { IRenderer, IRenderContext } from './IGroupingRenderer';

export interface Pipeline {
  run(context: IRenderContext): Promise<void>;
}

export function buildPipeline(renderers: IRenderer[]): Pipeline {
  return {
    async run(context: IRenderContext) {
      for (const renderer of renderers) {
        await renderer.render(context);
      }
    }
  };
}
