// Exercise 3: metadata export
//
// Fill in the `metadata` export for a product page so the <head> gets
// a proper title and description, then implement `buildTitle` which
// derives a per-product title used by `generateMetadata` in dynamic
// routes (the pattern you'd use once the product name comes from a
// database instead of being hardcoded).

export const metadata = {
  // TODO: set title to "My Store" and description to
  // "Buy the best products online."
  title: "",
  description: "",
};

function buildTitle(productName: string): string {
  // TODO: return `${productName} | My Store`
  return "";
}

// --- self-check: do not modify below this line ---
const metaOk = metadata.title === "My Store" && metadata.description === "Buy the best products online.";
const titleOk = buildTitle("Sneakers") === "Sneakers | My Store";
console.log(metaOk ? "metadata: PASS" : "metadata: FAIL");
console.log(titleOk ? "buildTitle: PASS" : "buildTitle: FAIL");
console.log(metaOk && titleOk ? "ALL PASS" : "SOME FAILED");
