/**
 * Forgot Password ViewModel Builder
 * 
 * Transforms API DTOs into ForgotPasswordViewModel for client-side state management.
 * Deterministic, side-effect free, no business logic.
 */

import { ForgotPasswordViewData } from '@/lib/builders/view-data/types/ForgotPasswordViewData';
import { ForgotPasswordViewModel, ForgotPasswordFormState } from '@/lib/view-models/auth/ForgotPasswordViewModel';

export class ForgotPasswordViewModelBuilder {
  static build(viewData: ForgotPasswordViewData): ForgotPasswordViewModel {
    const formState: ForgotPasswordFormState = {
      fields: {
        email: { value: '', error: undefined, touched: false, validating: false },
      },
      isValid: true,
      isSubmitting: false,
      submitError: undefined,
      submitCount: 0,
    };

    return new ForgotPasswordViewModel(
      viewData.returnTo,
      formState,
      false,
      null,
      null,
      false,
      null
    );
  }
}