import type { IWebsiteConfig } from "./rpc";
import {EXTRA_DEFAULT, EXTRA_HONGTIXIANYUE, EXTRA_MINGWUZHITANG, EXTRA_ZHISHIHUISHENG} from './extra.ts'

export function getConfig(Astro: any):IWebsiteConfig
{
    return Astro.locals.template_config;
}

// 取默认的配置
export function getExtra(extraTag: string = '')
{
    console.log(extraTag)
    if (extraTag == 'HONGTIXIANYUE') {
        return EXTRA_HONGTIXIANYUE;
    } else if (extraTag == 'ZHISHIHUISHENG') {
        return EXTRA_ZHISHIHUISHENG;
    } else if (extraTag == 'ZHISHIHUISHENG') {
        return EXTRA_MINGWUZHITANG;
    }

    return EXTRA_DEFAULT;
}