// Interface for module configuration
export interface ModuleConfig {
  name: string
  enabled: boolean
  options?: Record<string, any>
}

// Interface for app hooks
export interface AppHooks {
  beforeStart?: () => Promise<void> | void
  afterStart?: () => Promise<void> | void
  beforeMount?: () => Promise<void> | void
  afterMount?: () => Promise<void> | void
}

// Main app configuration interface
export interface AppConfig {
  // Basic app settings
  title: string
  baseColor: string
  languages: string[]

  // Advanced configuration
  modules?: ModuleConfig[]
  hooks?: AppHooks

  // Environment-specific settings
  dev?: {
    port?: number
    host?: string
    debug?: boolean
  }

  // Build configuration
  build?: {
    outDir?: string
    minify?: boolean
    sourcemap?: boolean
  }

  // Custom runtime configuration (accessible in app)
  runtimeConfig?: {
    public?: Record<string, any>
    private?: Record<string, any>
  }
}

export const defaultConfig: Partial<AppConfig> = {
  title: "App",
  baseColor: "#000000",
  languages: ["en"],
}
