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  SwipeDirection implements EnumClass {
    NO("不滑动","0"),
    UP("向上","up"),
    DOWN("向下","down"),
    LEFT("向左","left"),
    RIGHT("向右","right");

    private String key;
    private String value;

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

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