/** Copy + route segment for One — Sites primary-nav hubs (empty-state shells). */ export interface OneSitesHubMeta { title: string /** Meta line under the title (count, record ID, freshness). Omit it unless * the hub has a fact to show; never a blurb that restates the title. */ description?: string } export const ONE_SITES_HUB_META: Record = { locations: { title: "Locations", }, personnel: { title: "Personnel", }, "school-partners": { title: "School partners", }, availability: { title: "Availability", }, "slot-requests": { title: "Slot requests", }, schedules: { title: "Schedules", }, reports: { title: "Reports", }, jobs: { title: "Jobs", }, } export function oneSitesHubMetaForSegment(segment: string): OneSitesHubMeta { return ( ONE_SITES_HUB_META[segment] ?? { title: sentenceCaseSegment(segment), } ) } /** Slug to sentence case: `slot-requests` becomes `Slot requests`. */ function sentenceCaseSegment(segment: string): string { const words = segment.split("-").filter(Boolean) if (!words.length) return segment const [first, ...rest] = words return [first.charAt(0).toUpperCase() + first.slice(1), ...rest].join(" ") }