/** * HTP-5059 — the operator/chair restriction a care (or a set of cares) * places on an appointment, shared between the editor's create-mode * Selects and the Find-free-slots finder so the two flows cannot drift. * * Platform rule (Settings → Care settings, `CalendarCare.operatorIds` / * `chairIds`): a care with an EMPTY list carries no restriction — every * operator/chair may perform it. A non-empty list is the closed set of * operators/chairs allowed to perform it. With several cares on one * appointment, the allowed set is the INTERSECTION of the cares that * carry a restriction; cares with no restriction never narrow it. If * that intersection is empty (the cares share no common resource), the * caller shows every resource and an inline conflict notice rather than * blocking the form. */ import type { CalendarCare } from './calendar.types'; /** The result of narrowing a resource list by one or more cares' * restrictions. `list` is always what the Select should offer — * unrestricted and conflicting cases both fall back to every resource * passed in, so callers never need a separate branch for those. */ export interface CareResourceRestriction { /** Resources to list, already narrowed when `restricted` and not * `conflict`; the full input list otherwise. */ list: T[]; /** At least one of the cares carries a restriction on this axis. */ restricted: boolean; /** The restricted cares share no common resource — `list` is the full * input set and the caller should surface the conflict notice. */ conflict: boolean; } /** The operators a set of cares allows. Empty `cares` (nothing picked * yet) is unrestricted, same as a care with an empty `operatorIds`. */ export declare function allowedOperatorsFor(cares: readonly CalendarCare[], operators: readonly T[]): CareResourceRestriction; /** The chairs a set of cares allows. Mirrors `allowedOperatorsFor`. */ export declare function allowedChairsFor(cares: readonly CalendarCare[], chairs: readonly T[]): CareResourceRestriction; /** Whether `id` is still a legal pick under a restriction — used to * decide whether a care change should reset the current selection. * `NONE`/`ANY`-style sentinels never reach here; callers guard those * before calling. */ export declare function isResourceAllowed(id: string, restriction: CareResourceRestriction): boolean; //# sourceMappingURL=calendar-care-rules.d.ts.map