from enum import IntEnum


class ProvenanceAAM(IntEnum):
    NONE = 0
    GENERATED = 1
    TRIVIAL_TRANSPORT = 2
    IN_DB = 3
    USER_CURATED = 4

    def serialize(self) -> str:
        match self:
            case ProvenanceAAM.NONE:
                return "None"
            case ProvenanceAAM.GENERATED:
                return "Generated via RDT"
            case ProvenanceAAM.TRIVIAL_TRANSPORT:
                return "Transport reaction, trivial"
            case ProvenanceAAM.IN_DB:
                return "From AAM entry in ChemRecon database"
            case ProvenanceAAM.USER_CURATED:
                return "Curated by user"


class ProvenanceStruct(IntEnum):
    NONE = 0
    VIA_ENTRYGRAPH = 1
    IMPLICIT_FROM_AAM = 2
    USER_CURATED = 3

    def serialize(self) -> str:
        match self:
            case ProvenanceStruct.NONE:
                return "None"
            case ProvenanceStruct.VIA_ENTRYGRAPH:
                return "From Structure entry in ChemRecon database"
            case ProvenanceStruct.IMPLICIT_FROM_AAM:
                return "Implicit via AAM"
            case ProvenanceStruct.USER_CURATED:
                return "Curated by user"
