// Exercise 1: dynamic segment params
//
// Model app/products/[category]/[id]/page.tsx — a route with TWO
// dynamic segments. Implement ProductPage so it awaits params and
// returns a formatted string "Category: <category>, ID: <id>".

type Params = Promise<{ category: string; id: string }>;

async function ProductPage({ params }: { params: Params }): Promise<string> {
  // TODO: await params, then return `Category: ${category}, ID: ${id}`
  return "";
}

// --- self-check: do not modify below this line ---
async function runCheck() {
  const params: Params = Promise.resolve({ category: "shoes", id: "42" });
  const result = await ProductPage({ params });
  const ok = result === "Category: shoes, ID: 42";
  console.log(ok ? "PASS" : `FAIL — got "${result}"`);
}

runCheck();
