package net.northking.cctp.element.mobile.ios.enums;

import com.alibaba.fastjson.JSON;
import net.northking.cctp.element.core.type.EnumClass;

import java.util.*;

public enum TextDirection implements EnumClass {
    UP("上","上"),
    DOWN("下","下"),
    LEFT("左","左"),
    RIGHT("右","右");

    private String key;
    private String value;

    TextDirection(String key, String value){
        this.key = key;
        this.value = value;
    }

    @Override
    public String getEnumData() {
        List<Map<String,Object>> result = new ArrayList<>();
        for (TextDirection nullEnum : EnumSet.allOf(TextDirection.class)) {
            Map<String,Object> one = new HashMap();
            one.put("label",nullEnum.key);
            one.put("value",nullEnum.value);
            result.add(one);
        }
        return JSON.toJSONString(result);
    }
}
