import { startOnboarding } from '@/modules/onboarding/services/onboarding.service';
import type { AppContext } from '@/types/hono';
import type { OnboardingStartInput } from '@repo/api-contract';

export async function startOnboardingHandler(c: AppContext) {
  const payload = c.req.valid('json' as never) as OnboardingStartInput;

  const result = await startOnboarding(payload);
  return c.json(result, 202);
}
