import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { type Equal, type Writable } from "../../utils.js";
import { MsSqlColumn, MsSqlColumnBuilder } from "./common.js";
export type MsSqlVarCharBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = MsSqlVarCharBuilder<{
    name: TName;
    dataType: 'string';
    columnType: 'MsSqlVarChar';
    data: TEnum[number];
    driverParam: number | string;
    enumValues: TEnum;
    generated: undefined;
}>;
export type MsSqlVarCharJsonBuilderInitial<TName extends string> = MsSqlVarCharJsonBuilder<{
    name: TName;
    dataType: 'json';
    columnType: 'MsSqlNVarCharJson';
    data: unknown;
    driverParam: string;
    enumValues: undefined;
    generated: undefined;
}>;
export declare class MsSqlVarCharBuilder<T extends ColumnBuilderBaseConfig<'string', 'MsSqlVarChar'>> extends MsSqlColumnBuilder<T, MsSqlVarCharConfig<'text', T['enumValues']>> {
    static readonly [entityKind]: string;
}
export declare class MsSqlVarChar<T extends ColumnBaseConfig<'string', 'MsSqlVarChar'>> extends MsSqlColumn<T, MsSqlVarCharConfig<'text', T['enumValues']>> {
    static readonly [entityKind]: string;
    readonly length: number | 'max' | undefined;
    readonly enumValues: T["enumValues"] | undefined;
    readonly nonUnicode: boolean;
    getSQLType(): string;
}
export declare class MsSqlVarCharJsonBuilder<T extends ColumnBuilderBaseConfig<'json', 'MsSqlNVarCharJson'>> extends MsSqlColumnBuilder<T, {
    length: number | 'max' | undefined;
    nonUnicode: boolean;
}> {
    static readonly [entityKind]: string;
}
export declare class MsSqlVarCharJson<T extends ColumnBaseConfig<'json', 'MsSqlNVarCharJson'>> extends MsSqlColumn<T, {
    length: number | undefined;
    nonUnicode: boolean;
}> {
    static readonly [entityKind]: string;
    readonly length: number | 'max' | undefined;
    getSQLType(): string;
    mapFromDriverValue(value: string): T['data'];
    mapToDriverValue(value: T['data']): string;
}
export type MsSqlVarCharConfig<TMode extends 'text' | 'json', TEnum extends string[] | readonly string[] | undefined> = MsSqlVarCharConfigInitial<TMode, TEnum> & {
    nonUnicode: boolean;
};
export type MsSqlVarCharConfigInitial<TMode extends 'text' | 'json' = 'text' | 'json', TEnum extends string[] | readonly string[] | undefined = string[] | readonly string[] | undefined> = TMode extends 'text' ? {
    mode?: TMode;
    length?: number | 'max';
    enum?: TEnum;
} : {
    mode?: TMode;
    length?: number | 'max';
};
export declare function varchar(): MsSqlVarCharBuilderInitial<'', [string, ...string[]]>;
export declare function varchar<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MsSqlVarCharConfigInitial<'text', T | Writable<T>>): MsSqlVarCharBuilderInitial<'', Writable<T>>;
export declare function varchar<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MsSqlVarCharConfigInitial<'text', T | Writable<T>>): MsSqlVarCharBuilderInitial<TName, Writable<T>>;
export declare function nvarchar(): MsSqlVarCharBuilderInitial<'', [string, ...string[]]>;
export declare function nvarchar<U extends string, T extends Readonly<[U, ...U[]]>, TMode extends 'text' | 'json' = 'text' | 'json'>(config?: MsSqlVarCharConfigInitial<TMode, T | Writable<T>>): Equal<TMode, 'json'> extends true ? MsSqlVarCharJsonBuilderInitial<''> : MsSqlVarCharBuilderInitial<'', Writable<T>>;
export declare function nvarchar<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>, TMode extends 'text' | 'json' = 'text' | 'json'>(name: TName, config?: MsSqlVarCharConfigInitial<TMode, T | Writable<T>>): Equal<TMode, 'json'> extends true ? MsSqlVarCharJsonBuilderInitial<''> : MsSqlVarCharBuilderInitial<'', Writable<T>>;
