package com.cf.imes.module.executor.constants.file;

import org.springframework.boot.system.ApplicationHome;

import java.io.File;

/**
 * 模板文件路径 常量类
 *
 * @author Gqr
 * @since 2026/1/5 14:35
 */
public final class TemplateFilePathConstants {
    private TemplateFilePathConstants() {
    }

    public static final String ROOT_PATH;

    static {
        ApplicationHome home = new ApplicationHome(TemplateFilePathConstants.class);
        File jarDir = home.getDir(); // jar 所在目录
        ROOT_PATH = new File(jarDir, "type").getAbsolutePath();
    }

    /**
     * 根据语种获取贴皮导入模板
     *
     * @param language 语种
     * @return
     */
    public static String getVeneerImportTemplatePath(String language) {
        return ROOT_PATH + File.separator + "veneer" + File.separator + language;
    }
}
