import type Question from "../../v1/Question";
import type Database from "../../v1/metadata/Database";
import type Table from "../../v1/metadata/Table";
import AtomicQuery from "../../v1/queries/AtomicQuery";
import TemplateTagVariable from "../../v1/variables/TemplateTagVariable";
import type Variable from "../../v1/variables/Variable";
import type { Card, DatabaseId, DatasetQuery, NativeDatasetQuery, ParameterValuesConfig, TemplateTag, TemplateTags } from "../../../metabase-types/api";
import type Dimension from "../Dimension";
import DimensionOptions from "../DimensionOptions";
type DimensionFilter = (dimension: Dimension) => boolean;
type VariableFilter = (variable: Variable) => boolean;
export declare const NATIVE_QUERY_TEMPLATE: NativeDatasetQuery;
export declare const CARD_TAG_REGEX: RegExp;
export declare function updateCardTemplateTagNames(query: NativeQuery, cards: Card[]): NativeQuery;
export default class NativeQuery extends AtomicQuery {
    _nativeDatasetQuery: NativeDatasetQuery;
    constructor(question: Question, datasetQuery?: DatasetQuery);
    static isDatasetQueryType(datasetQuery: DatasetQuery): boolean;
    /**
     * @deprecated use MLv2
     */
    hasData(): string | boolean | null | undefined;
    canRun(): boolean;
    isEmpty(): boolean;
    tables(): Table[] | null | undefined;
    /**
     * @deprecated Use MLv2
     */
    _databaseId(): DatabaseId | null | undefined;
    /**
     * @deprecated Use MLv2
     */
    _database(): Database | null | undefined;
    engine(): string | null | undefined;
    setDatabaseId(databaseId: DatabaseId): NativeQuery;
    setDefaultCollection(): NativeQuery;
    hasWritePermission(): boolean;
    supportsNativeParameters(): boolean;
    table(): Table | null;
    queryText(): string;
    setQueryText(newQueryText: string): NativeQuery;
    collection(): string | null | undefined;
    setCollectionName(newCollection: string): NativeQuery;
    setParameterIndex(id: string, newIndex: number): NativeQuery;
    lineCount(): number;
    /**
     * Whether the DB selector should be a DB + Table selector. Mongo needs both DB + Table.
     */
    requiresTable(): boolean;
    templateTagsMap(): TemplateTags;
    templateTags(): TemplateTag[];
    variableTemplateTags(): TemplateTag[];
    hasVariableTemplateTags(): boolean;
    hasSnippets(): boolean;
    referencedQuestionIds(): number[];
    private _validateTemplateTags;
    private _allTemplateTagsAreValid;
    setTemplateTag(name: string, tag: TemplateTag): NativeQuery;
    setTemplateTagConfig(tag: TemplateTag, config: ParameterValuesConfig): NativeQuery;
    setDatasetQuery(datasetQuery: DatasetQuery): NativeQuery;
    dimensionOptions(dimensionFilter?: DimensionFilter, operatorFilter?: <T>(value: T) => T): DimensionOptions;
    variables(variableFilter?: VariableFilter): TemplateTagVariable[];
    updateSnippetsWithIds(snippets: any): NativeQuery;
    updateSnippetNames(snippets: any): NativeQuery;
    /**
     * special handling for NATIVE cards to automatically detect parameters ... {{varname}}
     */
    private _getUpdatedTemplateTags;
}
export {};
