import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { App } from './app/app';
import mermaid from 'mermaid';

declare global {
  interface Window {
    mermaid: typeof mermaid;
  }
}

// Expose mermaid globally for ngx-remark's MermaidComponent
window.mermaid = mermaid;
mermaid.initialize({
  startOnLoad: false,
  securityLevel: 'loose',
  theme: 'dark'
});

bootstrapApplication(App, appConfig)
  .catch((err) => console.error(err));
