/**
 * How a civil id or passport number is shown in the add-volunteers picker.
 *
 * `VolunteerPickerResource` sends only the last four digits, deliberately — the
 * organizer needs enough to tell two similar names apart and no more. This
 * formats what arrives; it does not do the masking, which is the server's.
 */
export const maskedIdentifier = (
  lastFour?: string | null,
  full?: string | null
): string | null => {
  if (lastFour) return `…${lastFour}`;
  return full || null;
};

/**
 * Search-and-select modal for directly registering existing volunteers to an
 * opportunity. Fully self-contained: owns its own search, pagination and
 * selection state, only reporting back on success.
 */
