import type { GetServerSideProps } from 'next'
import LiquidityOperationsPage from '@/components/explorer/LiquidityOperationsPage'
import type { TokenListResponse } from '@/services/api/config'
import type { InternalExecutionPlanResponse, PlannerCapabilitiesResponse } from '@/services/api/planner'
import type { MissionControlLiquidityPool, RouteMatrixResponse } from '@/services/api/routes'
import type { MissionControlBridgeStatusResponse } from '@/services/api/missionControl'
import type { ExplorerStats } from '@/services/api/stats'

interface TokenPoolRecord {
  symbol: string
  pools: MissionControlLiquidityPool[]
}

interface LiquidityPageProps {
  initialTokenList: TokenListResponse | null
  initialRouteMatrix: RouteMatrixResponse | null
  initialPlannerCapabilities: PlannerCapabilitiesResponse | null
  initialInternalPlan: InternalExecutionPlanResponse | null
  initialTokenPoolRecords: TokenPoolRecord[]
  initialStats: ExplorerStats | null
  initialBridgeStatus: MissionControlBridgeStatusResponse | null
}

export default function LiquidityPage(props: LiquidityPageProps) {
  return <LiquidityOperationsPage {...props} />
}

export const getServerSideProps: GetServerSideProps<LiquidityPageProps> = async () => ({
  props: {
    initialTokenList: null,
    initialRouteMatrix: null,
    initialPlannerCapabilities: null,
    initialInternalPlan: null,
    initialTokenPoolRecords: [],
    initialStats: null,
    initialBridgeStatus: null,
  },
})
