import type { ComponentType } from 'react';
import { Navigate, Route } from 'react-router-dom';
import type { StaffPermissionSection } from '../../../../utils/staffAccess';
import UserPage from './UserPage';
import StaffRecordProfile from './StaffRecordProfile';
import StaffWorkspacesPage from './StaffWorkspacesPage/StaffWorkspacesPage';
import StaffRecordRoles from './StaffRecordRoles';
import StaffRecordServices from './StaffRecordServices';
import EditPractitionerRolePage from './PractitionerRolesPage/PractitionerRolePage/PractitionerRolePage';
import StaffPatientBookingPage from './StaffPatientBookingPage/StaffPatientBookingPage';
type StaffGuard = ComponentType<{ section: StaffPermissionSection; manage?: boolean }>;
// The staff record. staff:view opens the record shell and reads Profile, Roles and Services; each of
// those picks the editor only for staff:manage, and every other tab stays staff:manage outright. Takes the guard so a test can mount the real tree.
export const staffRecordRoutes = (Guard: StaffGuard) => (
}>
}>
} />
} />
} />
} />
{/* A delegated staff:manage workspace (e.g. HR) onboards staff on these tabs. Admin-workspace
GRANTING is guarded inside StaffWorkspacesPage (non-admins cannot add or remove Admin). */}
}>
} />
} />
{/* Read-only report of what patients can book with this provider; it changes nothing. */}
} />
);