// Shared clickable-account-name control for report tables — Task 9.
// CLAUDE.md §9 "every number drills through": every account row in every
// report (P&L, balance sheet, trial balance) uses this to jump to
// #/account/:id (the entry list behind that balance). A real <button> (not a
// row-level onClick) so the drill-through stays keyboard/screen-reader
// reachable, matching the pattern BalancePanel.tsx/ActivityList.tsx already
// used for the dashboard's own drill-through-ready rows.

export function AccountLink({
  id,
  name,
  onSelect,
}: {
  id: string;
  name: string;
  onSelect: (accountId: string) => void;
}) {
  return (
    <button type="button" className="acct-link" onClick={() => onSelect(id)}>
      {name}
    </button>
  );
}
