import 'dart:developer';

import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';

class ValidationUtils {
  static final DialogService _dialogService = getIt.get<DialogService>();

  static bool isValidatePhoneAndId({String? nationalId, String? phoneNumber}) {
    log("phoneNumber: $phoneNumber");
    log("nationalId: $nationalId");
    if (nationalId == null || nationalId.isEmpty) {
      _dialogService.showErrorBottomSheet(message: "Please enter a valid national ID or file number", onOkPressed: () {});
      return false;
    }

    if (phoneNumber == null || phoneNumber.isEmpty) {
      _dialogService.showErrorBottomSheet(message: "Please enter a valid phone number", onOkPressed: () {});
      return false;
    }
    return true;
  }
}
