'use client';
import { Link } from '@/core/lib/navigation';
import { useTranslations } from '@/core/lib/translations';
/**
* The slim header shown INSTEAD of the site header on `/checkout`
* (`}>`, see site-chrome-gate.tsx).
*
* The full header is an exit, so it is hidden there. But a shopper with no way
* back at all is stuck: they cannot reach the home page, and cannot reach the cart
* to change what they are buying. This gives exactly those two ways out and nothing
* else: the brand (to `/`) and a link to the cart. No menu, search, account, language
* or announcement bar.
*
* `logo` and `storeName` come from the layout (the merchant's header content), so a
* store with an uploaded logo shows it here too.
*/
export function CheckoutHeader({
logo,
storeName,
}: {
logo?: { src: string; alt?: string } | null;
storeName?: string;
}) {
const t = useTranslations('nav');
const brandLabel = logo?.alt || storeName || 'Store';
return (