import path from 'node:path';
import type { StxConfig, StxOptions } from './types';
/**
 * Load the stx config for a project.
 *
 * `cwd` lets the caller specify which directory to search in — critical for
 * the dev server, which may be invoked as `stx <app-dir>` from outside the
 * app. Without it, `process.cwd()` is used, which can accidentally pick up
 * a stray `stx.config.ts` / `.config/stx.ts` from a parent directory.
 *
 * Results are cached per cwd so repeated calls don't re-read disk.
 */
export declare function loadStxConfig(cwd?: string): Promise<StxConfig>;
/**
 * Helper function to define stx configuration
 */
export declare function defineStxConfig(config: StxOptions): StxOptions;
/**
 * Validate stx configuration
 *
 * @param config - Configuration to validate
 * @returns Validation result with errors and warnings
 *
 * @example
 * ```typescript
 * const result = validateConfig(myConfig)
 * if (!result.valid) {
 *   console.error('Config errors:', result.errors)
 * }
 * ```
 */
export declare function validateConfig(config: StxOptions): ConfigValidationResult;
export declare const defaultConfig: StxConfig;
// Export a synchronous getter that returns defaults immediately, then loads async
// This allows the module to be imported instantly without blocking
export declare const config: StxConfig;
/**
 * Configuration validation error
 */
export declare interface ConfigValidationError {
  path: string
  message: string
  severity: 'error' | 'warning'
}
/**
 * Configuration validation result
 */
export declare interface ConfigValidationResult {
  valid: boolean
  errors: ConfigValidationError[]
  warnings: ConfigValidationError[]
}
