"use client" import * as React from "react" import { Link } from "@/lib/router-compat" import { cn } from "@/lib/utils" import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "@/components/ui/breadcrumb" export interface PageBreadcrumbTrailItem { label: string href?: string } export interface PageBreadcrumbBackProps { /** Destination label (e.g. "Question hub") — shown after the back icon. */ label: string href: string className?: string } export interface PageBreadcrumbTrailProps { /** Linkable ancestors (e.g. Question hub). */ items?: PageBreadcrumbTrailItem[] /** * Final segment in the trail. Omit when the current page is the `PageHeader` * `

` — use ancestors-only above the title (no duplicate label). */ currentPage?: string /** * `header` — SiteHeader: ancestors + `currentPage` on one line. * `content` — ancestors only, above `PageHeader` title. */ variant?: "header" | "content" className?: string } /** * Single-step back nav — back icon + parent destination (no chevron trail). * Use in `SiteHeader` for focused child routes (composer, wizard) where the * page `

` is the current title. */ export function PageBreadcrumbBack({ label, href, className }: PageBreadcrumbBackProps) { return (