/** Broker Dashboard chips — shared by the page (deep links) and the client component. */
// Nash, 2026-09-19: "Company Info" — the broker company connected to this
// agent (verification status, company profile, Company Admin approvals).
// Same chip row, one more chip; the trips chips keep their behaviour.
export const FILTERS = ['All', 'Waiting on Permits', 'Active', 'History', 'Company Info'] as const
export type Filter = (typeof FILTERS)[number]

/** `?tab=company-info` deep link (status chip, verification emails) → chip. */
export function filterFromSlug(slug: string | undefined): Filter | null {
  if (!slug) return null
  return FILTERS.find((f) => f.toLowerCase().replace(/\s+/g, '-') === slug.toLowerCase()) ?? null
}
