'use client';
import type { ReactNode } from 'react';
import { NurseLayout } from '@/layout';
import { RoleGuard } from '@/components/auth';
import { APP_ROLES } from '@/constants';

/*
 * Nurse route group (/nurse/…) — its own shell (dashboard, verification, EVV visits).
 * A real path segment keeps nurse screens namespaced under /nurse. RoleGuard redirects
 * a caller without the nurse role home (with a toast); a nurse never flashes the wrong app.
 */
export default function NurseRouteLayout({ children }: { children: ReactNode }) {
  return (
    <RoleGuard expected={APP_ROLES.NURSE}>
      <NurseLayout>{children}</NurseLayout>
    </RoleGuard>
  );
}
