(roles: Pick<CommitmentRoles, 'deadline' | 'occupied_until'>)
| 2 | import { isDateOnly, roleDay, todayIn, wallToInstant, type OccurrenceState } from '$lib/calendar/presentation'; |
| 3 | |
| 4 | export function commitmentKind(roles: Pick<CommitmentRoles, 'deadline' | 'occupied_until'>): 'deadline_hard' | 'window' | 'check' { |
| 5 | if (roles.deadline !== null) return 'deadline_hard'; |
| 6 | if (roles.occupied_until !== null) return 'window'; |
| 7 | return 'check'; |
| 8 | } |
| 9 | |
| 10 | |
| 11 | /** undefined is loading/unavailable; null is an authoritative not_found. */ |