import type { GetServerSideProps } from 'next'
import AnalyticsOperationsPage from '@/components/explorer/AnalyticsOperationsPage'
import type { ExplorerRecentActivitySnapshot, ExplorerStats, ExplorerTransactionTrendPoint } from '@/services/api/stats'
import type { Block } from '@/services/api/blocks'
import type { Transaction } from '@/services/api/transactions'
import type { MissionControlBridgeStatusResponse } from '@/services/api/missionControl'

interface AnalyticsPageProps {
  initialStats: ExplorerStats | null
  initialTransactionTrend: ExplorerTransactionTrendPoint[]
  initialActivitySnapshot: ExplorerRecentActivitySnapshot | null
  initialBlocks: Block[]
  initialTransactions: Transaction[]
  initialBridgeStatus: MissionControlBridgeStatusResponse | null
}

export default function AnalyticsPage(props: AnalyticsPageProps) {
  return <AnalyticsOperationsPage {...props} />
}

export const getServerSideProps: GetServerSideProps<AnalyticsPageProps> = async () => ({
  props: {
    initialStats: null,
    initialTransactionTrend: [],
    initialActivitySnapshot: null,
    initialBlocks: [],
    initialTransactions: [],
    initialBridgeStatus: null,
  },
})
