import 'tender_feedback.dart';

/// Extension for parsing string to TenderFeedback
extension TenderFeedbackExtension on String {
  /// Parse string to TenderFeedback
  TenderFeedback? toTenderFeedback() {
    switch (this) {
      case 'like':
        return TenderFeedback.liked;
      case 'dislike':
        return TenderFeedback.disliked;
      case 'unlike':
        return TenderFeedback.unliked;
      case 'undislike':
        return TenderFeedback.undisliked;
      default:
        return null;
    }
  }
}
