package com.red.circle.other.app.service.system;

import com.red.circle.other.app.command.system.i18n.SystemI18nConfigQryExe;
import com.red.circle.other.domain.system.i18n.I18nTypeEnum;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 国际化配置服务
 *
 * @author Leo
 * @date 2025-01-13
 */
@Service
@RequiredArgsConstructor
public class SystemI18nConfigService {

    private final SystemI18nConfigQryExe systemI18nConfigQryExe;

    /**
     * 获取配置值
     */
    public String getValue(I18nTypeEnum i18nType, String countryCode, String i18nKey) {
        return systemI18nConfigQryExe.getValue(i18nType.getCode(), countryCode, i18nKey);
    }

    /**
     * 获取配置Map
     */
    public Map<String, String> getConfigMap(I18nTypeEnum i18nType, String countryCode) {
        return systemI18nConfigQryExe.getConfigMap(i18nType.getCode(), countryCode);
    }
}
