/**
 * Configuration for the Awesome Components MCP Server
 */

// Environment variable configurations with fallback defaults
export const GITLAB_BASE_URL = process.env.GITLAB_BASE_URL || 'http://gitlab.yeepay.com/awesome/awesome-components/-/raw/main/';
export const MAIN_LLMS_URL = process.env.MAIN_LLMS_URL || 'http://gitlab.yeepay.com/awesome/awesome-components/-/raw/main/llms.txt';
export const GITLAB_PERSONAL_ACCESS_TOKEN = process.env.GITLAB_PERSONAL_ACCESS_TOKEN;
export const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;

// New environment variables for gitlab-mcp integration
export const LLMS_TXT_URL = process.env.LLMS_TXT_URL;
export const GITLAB_PROJECT_ID = process.env.GITLAB_PROJECT_ID;
export const LLMS_TXT_FILE = process.env.LLMS_TXT_FILE || 'llms.txt';
export const INTERNAL_GITLAB_HOST = process.env.INTERNAL_GITLAB_HOST;

// Server configuration object
export const config = {
  port: PORT,
  name: "awesome-components-mcp",
  version: "1.0.0",
  description: "MCP server providing access to awesome-components documentation and integration guides",

  // URL configurations (backward compatibility)
  urls: {
    gitlabBase: GITLAB_BASE_URL,
    mainLlms: MAIN_LLMS_URL
  },

  // Authentication configurations
  auth: {
    gitlabToken: GITLAB_PERSONAL_ACCESS_TOKEN
  },

  // New configuration for gitlab-mcp integration
  llmsTxtUrl: LLMS_TXT_URL,
  llmsTxtProjectId: GITLAB_PROJECT_ID,
  llmsTxtFile: LLMS_TXT_FILE,
  internalGitlabHost: INTERNAL_GITLAB_HOST,
  internalGuidesProjectId: GITLAB_PROJECT_ID
};
