export interface BootstrapState {
  username?: string
  userId?: string
  isAdmin?: boolean
  error?: string
}

declare global {
  interface Window {
    __BOOTSTRAP__?: BootstrapState
  }
}

export function getBootstrapState(): BootstrapState {
  return window.__BOOTSTRAP__ ?? {}
}
