import type { GetServerSideProps } from 'next'
import SystemOperationsPage from '@/components/explorer/SystemOperationsPage'
import type { CapabilitiesResponse, NetworksConfigResponse, TokenListResponse } from '@/services/api/config'
import type { MissionControlBridgeStatusResponse } from '@/services/api/missionControl'
import type { RouteMatrixResponse } from '@/services/api/routes'
import type { ExplorerStats } from '@/services/api/stats'

interface SystemPageProps {
  initialBridgeStatus: MissionControlBridgeStatusResponse | null
  initialNetworksConfig: NetworksConfigResponse | null
  initialTokenList: TokenListResponse | null
  initialCapabilities: CapabilitiesResponse | null
  initialRouteMatrix: RouteMatrixResponse | null
  initialStats: ExplorerStats | null
}

export default function SystemPage(props: SystemPageProps) {
  return <SystemOperationsPage {...props} />
}

export const getServerSideProps: GetServerSideProps<SystemPageProps> = async () => ({
  props: {
    initialBridgeStatus: null,
    initialNetworksConfig: null,
    initialTokenList: null,
    initialCapabilities: null,
    initialRouteMatrix: null,
    initialStats: null,
  },
})
