import type { AnyCockroachTable } from "../table.js";
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { NonArray, Writable } from "../../utils.js";
import { CockroachColumn, CockroachColumnWithArrayBuilder } from "./common.js";
export type CockroachEnumObjectColumnBuilderInitial<TName extends string, TValues extends object> = CockroachEnumObjectColumnBuilder<{
    name: TName;
    dataType: 'string';
    columnType: 'CockroachEnumObjectColumn';
    data: TValues[keyof TValues];
    enumValues: string[];
    driverParam: string;
}>;
export interface CockroachEnumObject<TValues extends object> {
    (): CockroachEnumObjectColumnBuilderInitial<'', TValues>;
    <TName extends string>(name: TName): CockroachEnumObjectColumnBuilderInitial<TName, TValues>;
    <TName extends string>(name?: TName): CockroachEnumObjectColumnBuilderInitial<TName, TValues>;
    readonly enumName: string;
    readonly enumValues: string[];
    readonly schema: string | undefined;
}
export declare class CockroachEnumObjectColumnBuilder<T extends ColumnBuilderBaseConfig<'string', 'CockroachEnumObjectColumn'> & {
    enumValues: string[];
}> extends CockroachColumnWithArrayBuilder<T, {
    enum: CockroachEnumObject<any>;
}> {
    static readonly [entityKind]: string;
    constructor(name: T['name'], enumInstance: CockroachEnumObject<any>);
}
export declare class CockroachEnumObjectColumn<T extends ColumnBaseConfig<'string', 'CockroachEnumObjectColumn'> & {
    enumValues: object;
}> extends CockroachColumn<T, {
    enum: CockroachEnumObject<object>;
}> {
    static readonly [entityKind]: string;
    readonly enum: CockroachEnumObject<any>;
    readonly enumValues: string[];
    constructor(table: AnyCockroachTable<{
        name: T['tableName'];
    }>, config: CockroachEnumObjectColumnBuilder<T>['config']);
    getSQLType(): string;
}
export type CockroachEnumColumnBuilderInitial<TName extends string, TValues extends [string, ...string[]]> = CockroachEnumColumnBuilder<{
    name: TName;
    dataType: 'string';
    columnType: 'CockroachEnumColumn';
    data: TValues[number];
    enumValues: TValues;
    driverParam: string;
}>;
export interface CockroachEnum<TValues extends [string, ...string[]]> {
    (): CockroachEnumColumnBuilderInitial<'', TValues>;
    <TName extends string>(name: TName): CockroachEnumColumnBuilderInitial<TName, TValues>;
    <TName extends string>(name?: TName): CockroachEnumColumnBuilderInitial<TName, TValues>;
    readonly enumName: string;
    readonly enumValues: TValues;
    readonly schema: string | undefined;
}
export declare function isCockroachEnum(obj: unknown): obj is CockroachEnum<[string, ...string[]]>;
export declare class CockroachEnumColumnBuilder<T extends ColumnBuilderBaseConfig<'string', 'CockroachEnumColumn'> & {
    enumValues: [string, ...string[]];
}> extends CockroachColumnWithArrayBuilder<T, {
    enum: CockroachEnum<T['enumValues']>;
}> {
    static readonly [entityKind]: string;
    constructor(name: T['name'], enumInstance: CockroachEnum<T['enumValues']>);
}
export declare class CockroachEnumColumn<T extends ColumnBaseConfig<'string', 'CockroachEnumColumn'> & {
    enumValues: [string, ...string[]];
}> extends CockroachColumn<T, {
    enum: CockroachEnum<T['enumValues']>;
}> {
    static readonly [entityKind]: string;
    readonly enum: CockroachEnum<T["enumValues"]>;
    readonly enumValues: T["enumValues"];
    constructor(table: AnyCockroachTable<{
        name: T['tableName'];
    }>, config: CockroachEnumColumnBuilder<T>['config']);
    getSQLType(): string;
}
export declare function cockroachEnum<U extends string, T extends Readonly<[U, ...U[]]>>(enumName: string, values: T | Writable<T>): CockroachEnum<Writable<T>>;
export declare function cockroachEnum<E extends Record<string, string>>(enumName: string, enumObj: NonArray<E>): CockroachEnumObject<E>;
