package com.yinlihupo.enlish.service.constant;

public class ExamWordsConstant {

    public static final int PGN_COL = 53;

    public static final int GRADE_1 = 1;
    public static final int GRADE_2 = 2;
    public static final int GRADE_3 = 3;
    public static final int GRADE_4 = 4;
    public static final int GRADE_5 = 5;
    public static final int GRADE_6 = 6;
    public static final int GRADE_7 = 7;
    public static final int GRADE_8 = 8;

    public static final String GRADE_1_NAME = "一年级";
    public static final String GRADE_2_NAME = "二年级";
    public static final String GRADE_3_NAME = "三年级";
    public static final String GRADE_4_NAME = "四年级";
    public static final String GRADE_5_NAME = "五年级";
    public static final String GRADE_6_NAME = "六年级";
    public static final String GRADE_7_NAME = "初一";
    public static final String GRADE_8_NAME = "初二";


    public static final int ZONE_A_SIZE = 10;
    public static final int ZONE_B_SIZE = 20;
    public static final int ZONE_C_SIZE = 28;
    public static final int ZONE_D_SIZE = 21;
    public static final int ZONE_E_SIZE = 14;
    public static final int ZONE_F_SIZE = 7;


    // 摸底
    public static final int EXAM_TYPE_BASELINE = 1;
    // 中期
    public static final int EXAM_TYPE_MIDTERM = 2;
    // 期末
    public static final int EXAM_TYPE_FINAL = 3;
    // 小测
    public static final int EXAM_TYPE_TEST = 4;


    public static int getZoneA(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_2;
            case GRADE_2 -> GRADE_3;
            case GRADE_3 -> GRADE_4;
            case GRADE_4 -> GRADE_5;
            case GRADE_5 -> GRADE_6;
            case GRADE_6 -> GRADE_7;
            case GRADE_7 -> GRADE_8;
            default -> 0;
        };
    }

    public static int getZoneB(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_1;
            case GRADE_2 -> GRADE_2;
            case GRADE_3 -> GRADE_3;
            case GRADE_4 -> GRADE_4;
            case GRADE_5 -> GRADE_5;
            case GRADE_6 -> GRADE_6;
            case GRADE_7 -> GRADE_7;
            case GRADE_8 -> GRADE_8;
            default -> 0;
        };
    }

    public static int getZoneC(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_1;
            case GRADE_2 -> GRADE_1;
            case GRADE_3 -> GRADE_2;
            case GRADE_4 -> GRADE_3;
            case GRADE_5 -> GRADE_4;
            case GRADE_6 -> GRADE_5;
            case GRADE_7 -> GRADE_6;
            case GRADE_8 -> GRADE_7;
            default -> 0;
        };
    }

    public static int getZoneD(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_1;
            case GRADE_2 -> GRADE_1;
            case GRADE_3 -> GRADE_1;
            case GRADE_4 -> GRADE_2;
            case GRADE_5 -> GRADE_3;
            case GRADE_6 -> GRADE_4;
            case GRADE_7 -> GRADE_5;
            case GRADE_8 -> GRADE_6;
            default -> 0;
        };
    }

    public static int getZoneE(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_1;
            case GRADE_2 -> GRADE_1;
            case GRADE_3 -> GRADE_1;
            case GRADE_4 -> GRADE_1;
            case GRADE_5 -> GRADE_2;
            case GRADE_6 -> GRADE_3;
            case GRADE_7 -> GRADE_4;
            case GRADE_8 -> GRADE_5;
            default -> 0;
        };
    }

    public static int getZoneF(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_1;
            case GRADE_2 -> GRADE_1;
            case GRADE_3 -> GRADE_1;
            case GRADE_4 -> GRADE_1;
            case GRADE_5 -> GRADE_1;
            case GRADE_6 -> GRADE_2;
            case GRADE_7 -> GRADE_3;
            case GRADE_8 -> GRADE_4;
            default -> 0;
        };
    }

    public static String getGradeName(int gradeId) {
        return switch (gradeId) {
            case GRADE_1 -> GRADE_1_NAME;
            case GRADE_2 -> GRADE_2_NAME;
            case GRADE_3 -> GRADE_3_NAME;
            case GRADE_4 -> GRADE_4_NAME;
            case GRADE_5 -> GRADE_5_NAME;
            case GRADE_6 -> GRADE_6_NAME;
            case GRADE_7 -> GRADE_7_NAME;
            case GRADE_8 -> GRADE_8_NAME;
            default -> "";
        };
    }

    public static String day2Chinese(int day) {
        return switch (day) {
            case 1 -> "一";
            case 2 -> "二";
            case 3 -> "三";
            case 4 -> "四";
            case 5 -> "五";
            case 6 -> "六";
            case 7 -> "七";
            default -> "";
        };
    }
}
