import { Column, Analysis } from '@drzl/analyzer';

interface Table {
    name: string;
    tsName: string;
    columns: Column[];
    primaryKey?: {
        columns: string[];
    };
}
type ValidationLibrary = 'zod' | 'valibot' | 'arktype';
interface FormatOptions {
    enabled?: boolean;
    engine?: 'auto' | 'prettier' | 'biome';
    configPath?: string;
}
interface ValidationGenerateOptions {
    outDir: string;
    format?: FormatOptions;
    fileSuffix?: string;
    schemaSuffix?: string;
    coerceDates?: 'input' | 'all' | 'none';
    emit?: {
        select?: boolean;
        insert?: boolean;
        update?: boolean;
    };
}
interface ValidationRenderer<TOptions extends ValidationGenerateOptions = ValidationGenerateOptions> {
    readonly library: ValidationLibrary;
    renderTable(table: Table, opts?: TOptions): string;
    renderIndex?(analysis: Analysis, opts?: TOptions): string;
    generate(opts: TOptions): Promise<string[]>;
}
declare function isGeneratedColumn(c: Column, primaryKeyColumns: string[]): boolean;
declare function insertColumns(table: Table): Column[];
declare function updateColumns(table: Table): Column[];
declare function selectColumns(table: Table): Column[];
declare function formatCode(code: string, filePath: string, fmt?: FormatOptions): Promise<any>;

export { type FormatOptions, type Table, type ValidationGenerateOptions, type ValidationLibrary, type ValidationRenderer, formatCode, insertColumns, isGeneratedColumn, selectColumns, updateColumns };
