import { Injectable } from '@angular/core';
import { BootstrapConfig } from '../../../shared/models/config';

@Injectable({ providedIn: 'root' })
export class ProjectEditorIoService {
  exportBootstrap(config: BootstrapConfig): string {
    return JSON.stringify(config, null, 2);
  }

  importBootstrap(raw: string): BootstrapConfig {
    return JSON.parse(raw) as BootstrapConfig;
  }
}
