package com.rssuper.parsing

sealed class FeedType(val value: String) {
    data object RSS : FeedType("rss")
    data object Atom : FeedType("atom")

    companion object {
        fun fromString(value: String): FeedType {
            return when (value.lowercase()) {
                "rss" -> RSS
                "atom" -> Atom
                else -> throw IllegalArgumentException("Unknown feed type: $value")
            }
        }
    }
}
