import Link from 'next/link'

/** Contextual back affordance for pages reached off the main nav (Alerts,
 *  Settings, Support, Profile, admin tools) — the top nav alone doesn't make
 *  "how do I get back" obvious once you're deep in a dropdown-only page. */
export function BackLink({
  href = '/dashboard',
  label = 'Back to Dashboard',
}: {
  href?: string
  label?: string
}) {
  return (
    <Link
      href={href}
      className="inline-flex items-center gap-1.5 text-sm font-semibold text-neutral-500 hover:text-neutral-900"
    >
      <span aria-hidden>←</span> {label}
    </Link>
  )
}
