package com.njcn.gather.aireport.common.constant;

import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;

/**
 * ai-report 文件扩展名白名单。
 */
public final class AiReportFileExtensionConst {

    private AiReportFileExtensionConst() {
    }

    public static final Set<String> ALLOWED_EXTENSIONS = unmodifiable("docx", "xlsx", "pdf");

    public static final Set<String> WORD_EXTENSIONS = unmodifiable("docx");

    public static final Set<String> EXCEL_EXTENSIONS = unmodifiable("xlsx");

    public static final Set<String> PDF_EXTENSIONS = unmodifiable("pdf");

    private static Set<String> unmodifiable(String... extensions) {
        return Collections.unmodifiableSet(new LinkedHashSet<String>(Arrays.asList(extensions)));
    }
}
