/**
 * Forgot Password View Data Builder
 *
 * Transforms ForgotPasswordPageDTO into ViewData for the forgot password template.
 * Deterministic, side-effect free, no business logic.
 */

import { ForgotPasswordPageDTO } from '@/lib/services/auth/types/ForgotPasswordPageDTO';
import { ForgotPasswordViewData } from './types/ForgotPasswordViewData';

export class ForgotPasswordViewDataBuilder {
  static build(apiDto: ForgotPasswordPageDTO): ForgotPasswordViewData {
    return {
      returnTo: apiDto.returnTo,
      showSuccess: false,
      formState: {
        fields: {
          email: { value: '', error: undefined, touched: false, validating: false },
        },
        isValid: true,
        isSubmitting: false,
        submitError: undefined,
        submitCount: 0,
      },
      isSubmitting: false,
      submitError: undefined,
    };
  }
}