import { appendSlash } from './utils/appendSlash'; export interface ProjectSettings { ASSIST_PROJECT_ID?: string; CHAT_BOT?: string; // "personal" or "business" CDN?: string; // Should ends with "/" /** @deprecated */ BASE_PATH?: string; // Should ends with "/" YANDEX_MAP_API_KEY?: string; YANDEX_METRIKA_ID?: string; QUICK_ACTIONS?: string[]; } const URI_KEYS: Array = ['CDN', 'BASE_PATH']; export const projectSettings: ProjectSettings & { _: ProjectSettings; setup: (_: ProjectSettings) => void; } = new Proxy( { _: {} as ProjectSettings, setup(_: ProjectSettings) { this._ = _; }, }, { get(target, p) { const result = target._[p] || target[p]; return URI_KEYS.includes(p as keyof ProjectSettings) ? appendSlash(result as string) : result; }, }, );