import { Injectable } from '@angular/core';
import { PageConfig } from '../../shared/models/config';
import { PageRenderModel } from './page-renderer.model';
import { SectionEngineService } from '../section-engine/section-engine.service';

@Injectable({ providedIn: 'root' })
export class PageRendererService {
  constructor(private readonly sectionEngine: SectionEngineService) {}

  toRenderModel(page: PageConfig): PageRenderModel {
    return this.sectionEngine.toPageRenderModel(page);
  }
}
