import { API_BASE } from '@/lib/config';

export async function generateStaticParams() {
  try {
    const res = await fetch(`${API_BASE}/admin/models?pageSize=100`);
    const data = await res.json();
    const items = data.items || [];
    if (items.length === 0) return [{ id: '1' }];
    return items.map((t: any) => ({ id: String(t.id) }));
  } catch {
    return [{ id: '1' }];
  }
}

import ClientPage from './client';

export default function Page() {
  return <ClientPage />;
}
