import type { Metadata } from 'next'
import { PLAN_FEATURES, PLAN_PRICES } from '@rentaldrivego/types'
import { marketplaceFetchOrDefault } from '@/lib/api'
import PricingPageContent from './PricingPageContent'

export const metadata: Metadata = {
  title: 'Pricing — RentalDriveGo',
  description: 'Simple, transparent pricing for every fleet size.',
}

const DEFAULT_PRICING = {
  prices: PLAN_PRICES,
  planFeatures: PLAN_FEATURES,
}

export default async function PricingPage() {
  const initialPricing = await marketplaceFetchOrDefault('/site/platform/pricing', DEFAULT_PRICING)
  return <PricingPageContent initialPricing={initialPricing} />
}
