package com.bytesw.bytebot.model.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
public enum ChannelEnum {
    WHATSAPP("WhatsApp"),
    MESSENGER("Facebook Messenger");

    private static final Map<String, ChannelEnum> map = new HashMap<>();

    private String name;

    ChannelEnum(String name){ this.name = name;}

    public  String getName() {return name;}

    static {
        for (ChannelEnum type : ChannelEnum.values()) {
            map.put(type.name, type);
        }
    }
    public static ChannelEnum fromString(String name) {
        return map.get(name);
    }
}
