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

/*
 * Customer-focused route group — a chrome-free counterpart to `(customer)` for flows the user
 * should not tab away from mid-task (today only first-run onboarding, ui-phase-3 §3.5). A route
 * group adds chrome without adding a URL segment, so `/onboarding` is unchanged. RoleGuard still
 * gates it on a resolved customer role, identically to the full `(customer)` shell.
 */
export default function CustomerFocusedRouteLayout({ children }: { children: ReactNode }) {
  return (
    <RoleGuard expected={APP_ROLES.CUSTOMER}>
      <FocusedLayout>{children}</FocusedLayout>
    </RoleGuard>
  );
}
