import { entityKind } from "../entity.js";
import type { SQL } from "../sql/sql.js";
import type { AnyMsSqlColumn, MsSqlColumn } from "./columns/index.js";
import type { MsSqlTable } from "./table.js";
interface IndexConfig {
    name: string;
    columns: IndexColumn[];
    /**
     * If true, the index will be created as `create unique index` instead of `create index`.
     */
    unique?: boolean;
    /**
     * Condition for partial index.
     */
    where?: SQL;
}
export type IndexColumn = MsSqlColumn | SQL;
export declare class IndexBuilderOn {
    private name;
    private unique;
    static readonly [entityKind]: string;
    constructor(name: string, unique: boolean);
    on(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder;
}
export interface AnyIndexBuilder {
    build(table: MsSqlTable): Index;
}
export interface IndexBuilder extends AnyIndexBuilder {
}
export declare class IndexBuilder implements AnyIndexBuilder {
    static readonly [entityKind]: string;
    constructor(name: string, columns: IndexColumn[], unique: boolean);
    where(condition: SQL): this;
}
export declare class Index {
    static readonly [entityKind]: string;
    readonly config: IndexConfig & {
        table: MsSqlTable;
    };
    constructor(config: IndexConfig, table: MsSqlTable);
}
export type GetColumnsTableName<TColumns> = TColumns extends AnyMsSqlColumn<{
    tableName: infer TTableName extends string;
}> | AnyMsSqlColumn<{
    tableName: infer TTableName extends string;
}>[] ? TTableName : never;
export declare function index(name: string): IndexBuilderOn;
export declare function uniqueIndex(name: string): IndexBuilderOn;
export {};
