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;
/**
 * Extract the registrable domain (eTLD+1) from a hostname.
 * e.g., 'api.agents.inkeep.com' -> 'inkeep.com', 'app.inkeep.com' -> 'inkeep.com'
 */
declare function getRootDomain(hostname: string): string;
/**
 * Check if a request origin is allowed for CORS
 * Development: Allow any localhost origin
 * Production: Allow same base domain, same root domain (when UI URL is configured), 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, getRootDomain, isOriginAllowed, playgroundCorsConfig, runCorsConfig, signozCorsConfig };