import 'package:pshared/data/dto/verification/purpose.dart';
import 'package:pshared/models/verification/purpose.dart';

extension VerificationPurposeDTOMapper on VerificationPurposeDTO {
  VerificationPurpose toDomain() {
    switch (this) {
      case VerificationPurposeDTO.login:
        return VerificationPurpose.login;
      case VerificationPurposeDTO.payout:
        return VerificationPurpose.payout;
      case VerificationPurposeDTO.accountActivation:
        return VerificationPurpose.accountActivation;
      case VerificationPurposeDTO.emailChange:
        return VerificationPurpose.emailChange;
      case VerificationPurposeDTO.passwordReset:
        return VerificationPurpose.passwordReset;
    }
  }
}

extension VerificationPurposeMapper on VerificationPurpose {
  VerificationPurposeDTO toDTO() {
    switch (this) {
      case VerificationPurpose.login:
        return VerificationPurposeDTO.login;
      case VerificationPurpose.payout:
        return VerificationPurposeDTO.payout;
      case VerificationPurpose.accountActivation:
        return VerificationPurposeDTO.accountActivation;
      case VerificationPurpose.emailChange:
        return VerificationPurposeDTO.emailChange;
      case VerificationPurpose.passwordReset:
        return VerificationPurposeDTO.passwordReset;
    }
  }
}
