import { useAuthStore } from '../store/useAuthStore';
import { usePractitionerStore } from '../practitioner/store/usePractitionerStore';

export function useActivePatientId(): string | null {
  const user = useAuthStore((s) => s.user);
  const viewingPatientId = usePractitionerStore((s) => s.viewingPatientId);

  return viewingPatientId || user?._id || null;
}
