import * as React from 'react';
import { createRoot } from 'react-dom/client';
import Blog from './blog/Blog';
import { ArticleProvider } from './blog/providers/Article';
import { AuthProvider as AuthorProvider } from './blog/providers/Author';
import { UploadProvider } from "./blog/providers/Upload";
import { AuthProvider } from "../auth/src";

const rootElement = document.getElementById('root');
const root = createRoot(rootElement);
const AUTH_BASE = import.meta.env.VITE_AUTH_BASE_URL;

root.render(
  <UploadProvider>
    <AuthProvider authBaseUrl={AUTH_BASE}>
      <AuthorProvider>
        <ArticleProvider>
          <Blog />
        </ArticleProvider>
      </AuthorProvider>
    </AuthProvider>
  </UploadProvider>
);
