import { cors } from "hono/cors";

//#region src/middleware/cors.d.ts
type CorsOptions = Parameters<typeof cors>[0];
/**
 * Extract the base domain from a hostname (e.g., 'app.preview.inkeep.com' -> 'preview.inkeep.com')
 */
declare function getBaseDomain(hostname: string): string;
/**
 * Check if a request origin is allowed for CORS
 * Development: Allow any localhost origin
 * Production: Allow same base domain or configured UI URL
 */
declare function isOriginAllowed(origin: string | undefined): origin is string;
/**
 * CORS configuration for auth routes (Better Auth, session endpoints)
 */
declare const authCorsConfig: CorsOptions;
/**
 * CORS configuration for default API routes
 */
declare const defaultCorsConfig: CorsOptions;
/**
 * CORS configuration for playground routes
 */
declare const playgroundCorsConfig: CorsOptions;
/**
 * CORS configuration for run routes (streaming, more permissive)
 */
declare const runCorsConfig: CorsOptions;
/**
 * CORS configuration for SigNoz proxy routes
 */
declare const signozCorsConfig: CorsOptions;
//#endregion
export { authCorsConfig, defaultCorsConfig, getBaseDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig };