import 'tender_approval_status.dart';

/// Extension for parsing string to TenderApprovalStatus
extension TenderApprovalStatusExtension on String {
  /// Parse string to TenderApprovalStatus
  TenderApprovalStatus? toTenderApprovalStatus() {
    switch (toLowerCase()) {
      case 'submitted':
        return TenderApprovalStatus.submitted;
      case 'rejected':
        return TenderApprovalStatus.rejected;
      case 'unsubmitted':
        return TenderApprovalStatus.unsubmitted;
      case 'unrejected':
        return TenderApprovalStatus.unrejected;
      default:
        return null;
    }
  }
}
