// @grafana/vue fat package types (composed from workspace single-file declarations)
import { Component } from "vue";
import { AxiosAdapter, AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
import * as vue from "vue";
import { InjectionKey } from "vue";
import { Tree } from "@lezer/common";

// ----- @grafana/data -----
type TimeZone = string;
interface AbsoluteTimeRange {
    from: number;
    to: number;
}
interface TimeRange {
    from: Date;
    to: Date;
    raw: {
        from: string | Date;
        to: string | Date;
    };
}
type FieldType = "time" | "number" | "string" | "boolean" | "other" | "nestedFrames";
interface FieldConfig {
    displayName?: string;
    unit?: string;
    decimals?: number | null;
    min?: number | null;
    max?: number | null;
    mappings?: ValueMapping[];
    thresholds?: ThresholdsConfig;
    color?: {
        mode?: string;
        fixedColor?: string;
    };
    links?: DataLink[];
    custom?: Record<string, unknown>;
    [key: string]: unknown;
}
interface ValueMapping {
    type: string;
    options: Record<string, unknown>;
}
interface Threshold {
    value: number;
    color: string;
}
interface ThresholdsConfig {
    mode: "absolute" | "percentage";
    steps: Threshold[];
}
interface DataLink {
    title: string;
    url: string;
    targetBlank?: boolean;
}
interface Field<T = unknown> {
    name: string;
    type: FieldType;
    config: FieldConfig;
    values: T[];
    labels?: Record<string, string>;
    state?: Record<string, unknown>;
}
interface DataFrame {
    name?: string;
    refId?: string;
    fields: Field[];
    length: number;
    meta?: Record<string, unknown>;
}
interface DataQuery {
    refId: string;
    datasource?: {
        type?: string;
        uid?: string;
    };
    hide?: boolean;
    queryType?: string;
    [key: string]: unknown;
}
interface DataSourceJsonData {
    [key: string]: unknown;
}
interface DataSourceSettings<T extends DataSourceJsonData = DataSourceJsonData> {
    id: number;
    uid: string;
    orgId: number;
    name: string;
    type: string;
    typeName?: string;
    typeLogoUrl?: string;
    access: string;
    url?: string;
    user?: string;
    database?: string;
    basicAuth?: boolean;
    basicAuthUser?: string;
    isDefault?: boolean;
    jsonData: T;
    secureJsonFields?: Record<string, boolean>;
    readOnly?: boolean;
    version?: number;
}
interface PanelModel {
    id: number;
    type: string;
    title?: string;
    description?: string;
    gridPos?: GridPos;
    targets?: DataQuery[];
    options?: Record<string, unknown>;
    fieldConfig?: {
        defaults: FieldConfig;
        overrides: Array<{
            matcher: {
                id: string;
                options?: unknown;
            };
            properties: Array<{
                id: string;
                value?: unknown;
            }>;
        }>;
    };
    transformations?: Array<{
        id: string;
        options?: Record<string, unknown>;
    }>;
    /** Grafana: true until first successful Apply from panel editor (discard removes panel). */
    isNew?: boolean;
    datasource?: {
        type?: string;
        uid?: string;
    };
    transparent?: boolean;
    [key: string]: unknown;
}
interface GridPos {
    x: number;
    y: number;
    w: number;
    h: number;
}
interface DashboardModel {
    uid?: string;
    title: string;
    description?: string;
    tags?: string[];
    timezone?: string;
    schemaVersion: number;
    version?: number;
    editable?: boolean;
    graphTooltip?: number;
    time?: {
        from: string;
        to: string;
    };
    timepicker?: Record<string, unknown>;
    refresh?: string;
    panels?: PanelModel[];
    templating?: {
        list: VariableModel[];
    };
    annotations?: {
        list: AnnotationQuery[];
    };
    links?: DataLink[];
    fiscalYearStartMonth?: number;
    weekStart?: string;
    liveNow?: boolean;
    [key: string]: unknown;
}
type VariableType = "query" | "custom" | "constant" | "datasource" | "interval" | "textbox" | "adhoc" | "system" | "groupby";
interface VariableModel {
    name: string;
    type: VariableType;
    label?: string;
    hide?: number;
    current?: {
        text: string | string[];
        value: string | string[];
    };
    options?: Array<{
        text: string;
        value: string;
        selected?: boolean;
    }>;
    query?: string | Record<string, unknown>;
    datasource?: {
        type?: string;
        uid?: string;
    };
    multi?: boolean;
    includeAll?: boolean;
    allValue?: string;
    regex?: string;
    refresh?: number;
    sort?: number;
    definition?: string;
    [key: string]: unknown;
}
interface AnnotationQuery {
    name: string;
    datasource?: {
        type?: string;
        uid?: string;
    };
    enable?: boolean;
    hide?: boolean;
    iconColor?: string;
    target?: Record<string, unknown>;
    [key: string]: unknown;
}
interface LoadingState {
    Loading: "Loading";
    Done: "Done";
    Error: "Error";
    NotStarted: "NotStarted";
    Streaming: "Streaming";
}
declare const LoadingStateEnum: {
    readonly Loading: "Loading";
    readonly Done: "Done";
    readonly Error: "Error";
    readonly NotStarted: "NotStarted";
    readonly Streaming: "Streaming";
};
type LoadingStateValue = (typeof LoadingStateEnum)[keyof typeof LoadingStateEnum];
interface PanelData {
    state: LoadingStateValue;
    series: DataFrame[];
    timeRange: TimeRange;
    error?: {
        message: string;
    };
    /** Multi-query / multi-error bag (Grafana PanelData.errors) */
    errors?: Array<{
        message: string;
        refId?: string;
    }>;
    request?: {
        requestId: string;
    };
    /** Convenience alias used by editor pipeline */
    requestId?: string;
    /** Dashboard annotation events for panels that support them */
    annotations?: any[];
    /** Per-step transformation pipeline snapshots for Inspect */
    transformSteps?: Array<{
        id: string;
        resolvedId: string;
        disabled?: boolean;
        frameCount: number;
        fieldNames: string[];
        rowCounts: number[];
        error?: string;
        optionKeys: string[];
    }>;
    /** Raw query frames before transformations */
    seriesBeforeTransform?: DataFrame[];
}
interface ScopedVars {
    [name: string]: {
        text: string | string[];
        value: string | string[];
    };
}

declare function createDataFrame(opts: {
    refId?: string;
    name?: string;
    meta?: Record<string, unknown>;
    fields: Array<Partial<Field> & {
        name: string;
        values: unknown[];
        type?: FieldType;
    }>;
}): DataFrame;
/** Format labels like Grafana: job=api, instance=localhost:9090 */
declare function formatLabels(labels?: Record<string, string> | null): string;
/**
 * Grafana-compatible field display name for legends / stats.
 * Priority: config.displayName → config.displayNameFromDS → labels / frame name → field name
 */
declare function getFieldDisplayName(field: Field, frame?: DataFrame, allFrames?: DataFrame[]): string;
declare function toDataFrameDTO(frame: DataFrame): DataFrame;

interface FrameNormalizationContext {
    refId?: string;
    source?: string;
    datasourceUid?: string;
    profile?: string;
    signal?: string;
    requestId?: string;
    semanticKind?: string;
    preferredVisualisationType?: string;
}
/**
 * Normalize adapter output frames to Grafana DataFrame invariants.
 * Does not run transformations or field overrides.
 */
declare function normalizeDataFrames(frames: DataFrame[], ctx?: FrameNormalizationContext): DataFrame[];
declare function frameFingerprint(frames: DataFrame[]): string;

declare function dateTime(input?: string | number | Date): Date;
declare function rangeUtil_parse(raw: {
    from: string | Date;
    to: string | Date;
}, now?: Date): TimeRange;
declare function getInterval(range: TimeRange, resolution?: number): string;
/** Grafana-aligned default auto-refresh intervals for RefreshPicker. */
declare const defaultRefreshIntervals: readonly ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"];
/**
 * Parse Grafana interval strings (5s, 10m, 1h, 1d) to milliseconds.
 * Empty / Off / unknown → 0 (auto-refresh disabled).
 * @see grafana-data stringToMs / intervalToMs
 */
declare function intervalToMs(input: string | undefined | null): number;
/** Alias used by Grafana RefreshPicker / SetInterval. */
declare const stringToMs: typeof intervalToMs;

type TransformerFn = (frames: DataFrame[], options?: Record<string, unknown>) => DataFrame[];
declare function registerTransformer(id: string, fn: TransformerFn): void;
declare function getTransformer(id: string): TransformerFn | undefined;

type TransformDiagnostic = {
    id: string;
    level: "warn" | "error";
    message: string;
};
declare function resolveTransformerId(id: string): string;
/** Grafana MatcherConfig-like frame filter on a transformation step. */
type FrameFilterConfig = string | {
    id?: string;
    options?: unknown;
} | null | undefined;
/**
 * Select which frames a transform applies to (Grafana transformation.filter).
 * Non-matching frames pass through unchanged and keep relative order.
 */
declare function matchFrameFilter(frame: DataFrame, filter: FrameFilterConfig): boolean;
type ApplyTransformationsContext = {
    interpolate?: (value: string) => string;
};
type TransformStepSnapshot = {
    id: string;
    resolvedId: string;
    disabled?: boolean;
    frameCount: number;
    fieldNames: string[];
    rowCounts: number[];
    error?: string;
    /** Sanitized option keys only (no secrets) */
    optionKeys: string[];
    filtered?: boolean;
};
type TransformPipelineResult = {
    frames: DataFrame[];
    steps: TransformStepSnapshot[];
    diagnostics: TransformDiagnostic[];
};
declare function applyTransformationsWithTrace(frames: DataFrame[], transformations?: Array<{
    id: string;
    options?: Record<string, unknown>;
    disabled?: boolean;
    filter?: unknown;
}>, context?: ApplyTransformationsContext): TransformPipelineResult;
declare function applyTransformations(frames: DataFrame[], transformations?: Array<{
    id: string;
    options?: Record<string, unknown>;
    disabled?: boolean;
    filter?: unknown;
}>, diagnostics?: TransformDiagnostic[], context?: ApplyTransformationsContext): DataFrame[];
declare function listTransformerIds(): string[];

declare function listStandardTransformers(): string[];
/** Evaluated after all registerTransformer calls. */
declare const standardTransformers: string[];

interface DashboardMigration {
    id: string;
    to: number;
    migrate: (dashboard: Record<string, any>) => Record<string, any>;
}
interface MigrationApplied {
    id: string;
    from: number;
    to: number;
}
interface MigrationResult {
    dashboard: Record<string, any>;
    applied: MigrationApplied[];
}

declare const V1_SCHEMA_VERSION = 42;
declare const v1Migrations: DashboardMigration[];
declare function runMigrations(input: Record<string, any>, migrations: DashboardMigration[]): MigrationResult;
declare function normalizeDashboard(dashboard: Record<string, any>): DashboardModel;
declare function migrateV1Dashboard(input: Record<string, any>): {
    dashboard: DashboardModel;
    applied: MigrationResult["applied"];
};

/** Minimal schema migration pipeline for Dashboard JSON round-trip. */
declare function migrateDashboard(input: Record<string, unknown>): DashboardModel;
declare function dashboardRoundTrip(input: Record<string, unknown>): DashboardModel;
declare function preserveUnknownFields(original: Record<string, unknown>, migrated: DashboardModel): DashboardModel;

declare function sortThresholds(steps: Threshold[]): Threshold[];
declare function getActiveThreshold(value: number, thresholds?: ThresholdsConfig): Threshold | undefined;
declare function applyValueMappings(value: unknown, mappings?: ValueMapping[]): string | undefined;
declare function resolveVizColor(color: string | undefined): string | undefined;
declare function continuousGrYlRd(percent: number): string;
declare function getFieldColor(value: number, config?: FieldConfig): string | undefined;

type DecimalCount = number | null | undefined;
interface FormattedValue {
    text: string;
    prefix?: string;
    suffix?: string;
}
interface DisplayValue extends FormattedValue {
    numeric: number;
    percent?: number;
    percentChange?: number;
    color?: string;
    icon?: string;
    title?: string;
    description?: string;
}
type DisplayProcessor = (value: unknown, decimals?: DecimalCount) => DisplayValue;
declare function formattedValueToString(val: FormattedValue): string;

interface DisplayProcessorOptions {
    field?: Partial<Field>;
    timeZone?: string;
    /** optional theme palette hook */
    theme?: {
        visualization?: {
            palette?: string[];
        };
    };
}
/**
 * Grafana-aligned display processor (Task 5.4).
 * Returns DisplayValue; renderers should prefer this over ad-hoc formatValue.
 */
declare function getDisplayProcessor(options?: DisplayProcessorOptions): DisplayProcessor;
declare function getRawDisplayProcessor(): DisplayProcessor;
declare function displayValueToString(v: DisplayValue): string;

/**
 * Classic palette hex values for dark mode (aligned with Grafana viz hues).
 * Light mode shifts one notch darker for contrast (upstream createVisualizationColors rule).
 */
declare const CLASSIC_PALETTE_DARK: string[];
/** Light mode classic (primary hues use semi-dark rung). */
declare const CLASSIC_PALETTE_LIGHT: string[];
/** @deprecated Prefer getClassicPalette(mode). Dark classic for back-compat. */
declare const CLASSIC_PALETTE: string[];
type ThemeModeHint = "light" | "dark";
interface ThemeColorContext {
    mode?: ThemeModeHint;
    /** Optional named-color resolver (theme.visualization.getColorByName) */
    getColorByName?: (name: string) => string;
}
/** Resolve current theme mode from DOM when not provided. */
declare function resolveThemeModeHint(mode?: ThemeModeHint): ThemeModeHint;
declare function getClassicPalette(mode?: ThemeModeHint): string[];
declare function getFieldSeriesColor(fieldName: string, seriesIndex: number, config?: FieldConfig, theme?: ThemeColorContext | ThemeModeHint): string;
declare function getThresholdColor(value: number, config: FieldConfig, theme?: ThemeColorContext | ThemeModeHint): string | undefined;

declare enum ReducerID {
    sum = "sum",
    max = "max",
    min = "min",
    mean = "mean",
    last = "last",
    first = "first",
    count = "count",
    lastNotNull = "lastNotNull",
    firstNotNull = "firstNotNull",
    range = "range",
    diff = "diff",
    diffperc = "diffperc",
    delta = "delta",
    step = "step",
    variance = "variance",
    stdDev = "stdDev",
    median = "median",
    allIsZero = "allIsZero",
    allIsNull = "allIsNull",
    changeCount = "changeCount",
    distinctCount = "distinctCount",
    logmin = "logmin"
}
type FieldCalcs = Record<string, number | null | boolean | number[]>;
declare function reduceField$1(field: Field, reducers?: string[]): FieldCalcs;
declare function listReducerIds(): string[];

/** @deprecated prefer getDisplayProcessor — kept for renderer compatibility */
declare function formatUnit(value: number, unit?: string, decimals?: number): string;
/** @deprecated prefer getDisplayProcessor */
declare function formatValue(value: unknown, config?: FieldConfig): string;
declare function reduceField(field: Field, reducers?: string[]): Record<string, number | null>;

/**
 * Field matcher registry (Task 5.3) — IDs aligned with Grafana FieldMatcherID.
 * @see grafana-main/packages/grafana-data/src/transformations/matchers
 */

declare enum FieldMatcherID {
    numeric = "numeric",
    time = "time",
    first = "first",
    firstTimeField = "firstTimeField",
    byType = "byType",
    byTypes = "byTypes",
    byName = "byName",
    byNames = "byNames",
    byRegexp = "byRegexp",
    byRegexpOrNames = "byRegexpOrNames",
    byFrameRefID = "byFrameRefID",
    byValue = "byValue"
}
type MatcherConfig = {
    id: string;
    options?: unknown;
};
type FieldMatcherFn = (field: Field, frame?: DataFrame, allFrames?: DataFrame[]) => boolean;
interface FieldMatcherInfo {
    id: string;
    name: string;
    description?: string;
    /** Whether this matcher is offered in the field override picker */
    pickerDefault?: boolean;
    get: (options?: unknown) => FieldMatcherFn;
}
declare function listFieldMatchers(): FieldMatcherInfo[];
declare function listOverridePickerMatchers(): FieldMatcherInfo[];
declare function getFieldMatcherInfo(id: string): FieldMatcherInfo | undefined;
/** Resolve matcher; unknown id returns always-false (does not throw — round-trip safe). */
declare function getFieldMatcher(config: MatcherConfig): FieldMatcherFn;
declare function matchFieldWithRegistry(field: Field, matcher: MatcherConfig, frame?: DataFrame, allFrames?: DataFrame[]): boolean;

/**
 * Override property processors — typed process/shouldApply for standard field props.
 * @see Grafana fieldConfig registry process functions
 */

type OverridePropertyId = "unit" | "decimals" | "min" | "max" | "fieldMinMax" | "displayName" | "noValue" | "color" | "thresholds" | "mappings" | "links" | "actions" | "filterable" | string;
interface OverridePropertyProcessor {
    id: OverridePropertyId;
    name: string;
    path: string;
    /** Process raw editor value into stored config value */
    process: (value: unknown) => unknown;
    shouldApply?: (field: Field) => boolean;
    /** Identity used when value is undefined / clear */
    isEmpty?: (value: unknown) => boolean;
}
declare const STANDARD_OVERRIDE_PROCESSORS: OverridePropertyProcessor[];
declare function getOverrideProcessor(id: string): OverridePropertyProcessor | undefined;
declare function processOverrideValue(id: string, value: unknown): unknown;
declare function isKnownOverrideProperty(id: string): boolean;
/** Apply a single processed property onto field config (does not mutate). */
declare function applyProcessedProperty(config: FieldConfig, id: string, raw: unknown): FieldConfig;

interface DynamicConfigValue {
    id: string;
    value?: unknown;
}
interface ConfigOverrideRule {
    matcher: MatcherConfig;
    properties: DynamicConfigValue[];
}

/** @deprecated prefer matchFieldWithRegistry — kept for existing call sites */
declare function matchField(field: Field, matcher: {
    id: string;
    options?: unknown;
}, frame?: DataFrame): boolean;
/**
 * Apply field config defaults + ordered override rules.
 * Unknown property ids are preserved on the rule (caller) but not applied to field config.
 * Rules execute in array order (Grafana semantics).
 */
declare function applyFieldOverrides(frames: DataFrame[], defaults?: FieldConfig, overrides?: ConfigOverrideRule[]): DataFrame[];

/**
 * Data link URL resolution — aligned with grafana-main link_srv / fieldOverrides link models.
 */

type DataLinkVars = Record<string, string | number | undefined | null>;
interface ResolveDataLinkContext {
    value?: unknown;
    field?: Field;
    frame?: DataFrame;
    frames?: DataFrame[];
    rowIndex?: number;
    seriesName?: string;
    /** Calculation name for ${__value.calc} (e.g. lastNotNull) */
    calc?: string;
    /** Dashboard time range for ${__from}/${__to}/${__url_time_range} */
    timeRange?: {
        from?: unknown;
        to?: unknown;
        raw?: {
            from?: string;
            to?: string;
        };
    };
    templateVars?: DataLinkVars;
    replaceVariables?: (s: string) => string;
}
/** Build scoped vars map for a cell/datapoint (Grafana-compatible keys). */
declare function buildDataLinkVars(ctx: ResolveDataLinkContext): DataLinkVars;
declare function interpolateDataLinkString(template: string, vars: DataLinkVars, encodeValues?: boolean): string;
/** @deprecated-compatible helper used by tests — does not URL-encode. */
declare function buildDataLinkUrl(link: DataLink, vars?: DataLinkVars): string;
declare function resolveDataLink(link: DataLink, ctx: ResolveDataLinkContext): {
    title: string;
    href: string;
    targetBlank?: boolean;
};
declare function getFieldLinks(field: Field, valueIndex: number, replace?: (s: string) => string, frame?: DataFrame, frames?: DataFrame[], extras?: Pick<ResolveDataLinkContext, "timeRange" | "calc" | "seriesName" | "templateVars">): Array<{
    title: string;
    href: string;
    targetBlank?: boolean;
}>;
/**
 * Grafana LinkSrv.getLinkUrl — dashboard links with keepTime / includeVars.
 * Appends ${__url_time_range} and ${__all_variables} then interpolates via resolveDataLink.
 */
declare function getDashboardLinkUrl(link: {
    url?: string;
    keepTime?: boolean;
    includeVars?: boolean;
    title?: string;
}, ctx?: ResolveDataLinkContext): string;

type JsonPatchOp = {
    op: "replace" | "add";
    path: string;
    value: unknown;
} | {
    op: "remove";
    path: string;
};
declare function parsePath(path: string): Array<string | number>;
declare function getAtPath(source: unknown, path: string): unknown;
declare function setAtPath<T extends Record<string, unknown>>(source: T, path: string, value: unknown): T;
declare function removeAtPath<T extends Record<string, unknown>>(source: T, path: string): T;
declare function applyJsonPatch<T extends Record<string, unknown>>(source: T, ops: JsonPatchOp[]): T;
declare function diffJsonPaths(a: unknown, b: unknown, base?: string): string[];

type DashboardSourceKind = "v1" | "v2" | "export-wrapper" | "snapshot" | "unknown";
interface DashboardDocumentEnvelope {
    sourceKind: DashboardSourceKind;
    dashboard: DashboardModel;
    original: Record<string, unknown>;
    meta?: Record<string, unknown>;
    inputs?: Array<Record<string, unknown>>;
    requires?: Array<Record<string, unknown>>;
    migrations?: Array<{
        id: string;
        from: number;
        to: number;
    }>;
    diagnostics: Array<{
        level: "info" | "warn" | "error";
        code: string;
        message: string;
        path?: string;
    }>;
    patches?: JsonPatchOp[];
}
declare function detectSourceKind(input: unknown): DashboardSourceKind;
declare function parseDashboardDocument(input: unknown): DashboardDocumentEnvelope;
declare function applyDocumentPatches(envelope: DashboardDocumentEnvelope, patches: JsonPatchOp[]): DashboardDocumentEnvelope;
declare function toSerializableDashboard(envelope: DashboardDocumentEnvelope): Record<string, unknown>;

/**
 * Grafana Dashboard API v2 (dashboard.grafana.app/v2*) → runtime v1 DashboardModel converter.
 * Supports kinded elements / layout / variables / annotations used by modern Grafana exports.
 *
 * Layout kinds: GridLayout, RowsLayout (nested), TabsLayout, AutoGridLayout
 * Element kinds: Panel, LibraryPanel
 */
type V2DashboardKind = "Dashboard";
declare function isV2Dashboard(input: unknown): boolean;
type Dict = Record<string, unknown>;
/** Resolve datasource ref from v2 `{ name: "$datasource" | "uid" }` or string. */
declare function resolveV2Datasource(ref: unknown): {
    type?: string;
    uid?: string;
} | undefined;
type LayoutItem = {
    elementName: string;
    x: number;
    y: number;
    w: number;
    h: number;
    repeat?: Dict;
};
type LayoutRow = {
    title: string;
    y: number;
    collapsed: boolean;
    id: number;
};
/**
 * Walk GridLayout / RowsLayout / TabsLayout / AutoGridLayout and produce absolute grid items + row markers.
 * Nested RowsLayout is supported. Decorative nested rows titled "New row" (or empty) are skipped
 * so y-offsets match Grafana's classic row panels.
 */
declare function flattenV2Layout(layout: unknown, yOffset?: number): {
    items: LayoutItem[];
    rows: LayoutRow[];
    maxY: number;
};
/**
 * Convert full v2 resource or bare spec into a v1-shaped dashboard model for the Vue runtime.
 */
declare function convertV2DashboardToV1(input: unknown): Dict;
/** @deprecated alias */
declare function v2ResourceToV1(input: unknown): Dict;

/** Grafana 13.2 DataTransformerID — authoritative set of 43 IDs. */
declare enum DataTransformerID {
    append = "append",
    reduce = "reduce",
    order = "order",
    organize = "organize",
    rename = "rename",
    calculateField = "calculateField",
    /** @deprecated use joinByField */
    seriesToColumns = "seriesToColumns",
    seriesToRows = "seriesToRows",
    merge = "merge",
    concatenate = "concatenate",
    labelsToFields = "labelsToFields",
    filterFields = "filterFields",
    filterFieldsByName = "filterFieldsByName",
    filterFrames = "filterFrames",
    filterByRefId = "filterByRefId",
    renameByRegex = "renameByRegex",
    filterByValue = "filterByValue",
    noop = "noop",
    ensureColumns = "ensureColumns",
    groupBy = "groupBy",
    sortBy = "sortBy",
    histogram = "histogram",
    configFromData = "configFromData",
    rowsToFields = "rowsToFields",
    prepareTimeSeries = "prepareTimeSeries",
    convertFieldType = "convertFieldType",
    convertFrameType = "convertFrameType",
    fieldLookup = "fieldLookup",
    heatmap = "heatmap",
    spatial = "spatial",
    joinByField = "joinByField",
    joinByLabels = "joinByLabels",
    extractFields = "extractFields",
    groupingToMatrix = "groupingToMatrix",
    limit = "limit",
    partitionByValues = "partitionByValues",
    timeSeriesTable = "timeSeriesTable",
    transpose = "transpose",
    formatTime = "formatTime",
    formatString = "formatString",
    regression = "regression",
    smoothing = "smoothing",
    groupToNestedTable = "groupToNestedTable"
}
declare const DATA_TRANSFORMER_IDS: DataTransformerID[];

/**
 * Data link variable suggestions — mirrors
 * grafana-main/public/app/features/panel/panellinks/link_srv.ts
 * getDataLinksVariableSuggestions (subset without full templateSrv).
 */

declare enum VariableOrigin {
    Series = "series",
    Field = "field",
    Fields = "fields",
    Value = "value",
    BuiltIn = "built-in",
    Template = "template"
}
/** Mirrors grafana-data VariableSuggestionsScope */
declare enum VariableSuggestionsScope {
    Values = "values"
}
interface VariableSuggestion {
    value: string;
    label: string;
    documentation?: string;
    origin: VariableOrigin;
}
declare const DataLinkBuiltInVars: {
    readonly keepTime: "__url_time_range";
    readonly timeRangeFrom: "__from";
    readonly timeRangeTo: "__to";
    readonly includeVars: "__all_variables";
    readonly seriesName: "__series.name";
    readonly fieldName: "__field.name";
    readonly fieldDisplayName: "__field.displayName";
    readonly valueTime: "__value.time";
    readonly valueNumeric: "__value.numeric";
    readonly valueText: "__value.text";
    readonly valueRaw: "__value.raw";
    readonly valueCalc: "__value.calc";
};
/**
 * Per-frame field accessors — mirrors grafana link_srv getDataFrameVars:
 * __data.fields.name, __data.fields[0], first numeric .numeric/.text, title pick.
 */
declare function getDataFrameVars(dataFrames: DataFrame[]): VariableSuggestion[];
/**
 * Grafana getPanelLinksVariableSuggestions template portion:
 * variable name + nested option property paths (getVariableValueProperties).
 * @param varNames flat variable names
 * @param propertyPaths optional map name → full dotted paths (e.g. env.region)
 */
declare function getTemplateVariableSuggestions(varNames?: string[], propertyPaths?: Record<string, string[]>): VariableSuggestion[];
/**
 * Full suggestion list for data links (aligned with getDataLinksVariableSuggestions).
 */
declare function getDataLinksVariableSuggestions(dataFrames?: DataFrame[], options?: {
    templateVars?: string[];
    /** Grafana getVariableValueProperties paths keyed by variable name */
    templateVarProperties?: Record<string, string[]>;
    scope?: VariableSuggestionsScope | string;
}): VariableSuggestion[];
/** Format as ${...} for insertion into URL. */
declare function formatSuggestionToken(s: VariableSuggestion): string;
/**
 * FrameFieldsDisplayNames — mirrors grafana-ui MatchersUI/utils getFrameFieldsDisplayNames.
 * Tracks display + raw names and field map for FieldNamePicker validation.
 */
interface FrameFieldsDisplayNames {
    display: Set<string>;
    raw: Set<string>;
    fields: Map<string, Field>;
}
declare function frameHasName(name: string | undefined, names: FrameFieldsDisplayNames): boolean;
declare function getFrameFieldsDisplayNames(data: DataFrame[], filter?: (field: Field) => boolean, existing?: FrameFieldsDisplayNames, parentData?: DataFrame[]): FrameFieldsDisplayNames;
/** Distinct field display names from frames (for FieldNamePicker). */
declare function getFieldNameOptions(dataFrames: DataFrame[], filter?: (field: Field) => boolean): Array<{
    label: string;
    value: string;
    type?: string;
    rawName?: string;
    frameName?: string;
    refId?: string;
}>;

/**
 * Grafana FieldNamePicker config types —
 * packages/grafana-data/src/field/overrides/processors.ts FieldNamePickerBaseNameMode
 * packages/grafana-ui MatchersUI utils MatcherScope
 */
/** Mirrors grafana-data FieldNamePickerBaseNameMode */
declare enum FieldNamePickerBaseNameMode {
    Default = "default",
    OnlyBaseNames = "OnlyBaseNames",
    ExcludeBaseNames = "ExcludeBaseNames"
}
/** Mirrors grafana-schema MatcherScope (subset used by FieldNamePicker) */
type MatcherScope = "series" | "nested" | "annotation" | "exemplar";
declare function normalizeBaseNameMode(mode?: string | FieldNamePickerBaseNameMode | null): "default" | "only" | "exclude";
declare function groupLabelForScope(scope?: MatcherScope): string;

type ValueFormatter = (value: number, decimals?: number | null, scaledDecimals?: number | null) => FormattedValue;

declare function getValueFormat(id?: string | null): ValueFormatter;
declare function listValueFormatIds(): string[];
declare function formatValueWithUnit(value: number, unit?: string | null, decimals?: number | null): FormattedValue;

type PanelLoadingState = "NotStarted" | "Loading" | "Streaming" | "Done" | "Error";
interface PanelDataLike {
    state: PanelLoadingState | string;
    series: DataFrame[];
    annotations?: DataFrame[];
    error?: {
        message?: string;
    } | Error | null;
    timeRange?: TimeRange;
    requestId?: string;
    structureRev?: number;
}
/**
 * Grafana preProcessPanelData previous-result semantics (Task 5.5).
 * Loading+empty keeps previous series; only Done+empty clears to no-data.
 */
declare function preProcessPanelData(data: PanelDataLike, lastResult?: PanelDataLike | null): PanelDataLike;

/** Component-level tokens (Grafana createComponents subset used by this Vue port). */
interface ThemeComponents {
    height: {
        sm: number;
        md: number;
        lg: number;
    };
    input: {
        background: string;
        text: string;
        borderColor: string;
        borderHover: string;
    };
    panel: {
        background: string;
        borderColor: string;
        padding: number;
        contentBg: string;
    };
    dropdown: {
        background: string;
        borderColor: string;
        selectedBackground: string;
    };
    tooltip: {
        background: string;
        text: string;
        borderColor: string;
    };
    overlay: {
        background: string;
        borderColor: string;
        boxShadow: string;
    };
    table: {
        headerBackground: string;
        rowHoverBackground: string;
        rowSelectedBackground: string;
    };
    drawer: {
        background: string;
        borderColor: string;
    };
    menu: {
        background: string;
        activeBackground: string;
        activeText: string;
    };
}

type ThemeMode = "light" | "dark";

interface ThemeRichColor {
    name: string;
    main: string;
    shade: string;
    text: string;
    border: string;
    transparent: string;
    borderTransparent: string;
    contrastText: string;
}
interface ThemeColors$1 {
    mode: ThemeMode;
    primary: ThemeRichColor;
    secondary: ThemeRichColor;
    tertiary: ThemeRichColor;
    accent: ThemeRichColor;
    info: ThemeRichColor;
    error: ThemeRichColor;
    success: ThemeRichColor;
    warning: ThemeRichColor;
    background: {
        canvas: string;
        page: string;
        primary: string;
        secondary: string;
        elevated: string;
    };
    text: {
        primary: string;
        secondary: string;
        disabled: string;
        link: string;
        maxContrast: string;
    };
    border: {
        weak: string;
        medium: string;
        strong: string;
    };
    gradients: {
        brandVertical: string;
        brandHorizontal: string;
    };
    action: {
        hover: string;
        selected: string;
        selectedBorder: string;
        hoverOpacity: number;
        focus: string;
        disabledBackground: string;
        disabledText: string;
        disabledOpacity: number;
    };
    scrollbar: string;
    hoverFactor: number;
    contrastThreshold: number;
    tonalOffset: number;
    getContrastText(background: string, threshold?: number): string;
    emphasize(color: string, amount?: number): string;
}
interface ThemeSpacing {
    (factor?: number): string;
    gridSize: number;
}
interface ThemeTypography {
    fontFamily: string;
    fontFamilyMonospace: string;
    fontSize: number;
    fontWeightLight: number;
    fontWeightRegular: number;
    fontWeightMedium: number;
    fontWeightBold: number;
    h1: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    h2: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    h3: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    h4: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    h5: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    h6: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    body: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
    bodySmall: {
        fontSize: string;
        fontWeight: number;
        lineHeight: number;
        letterSpacing?: string;
    };
}
interface ThemeVisualizationColors$1 {
    palette: string[];
    getColorByName: (name: string) => string;
    hues?: Array<{
        name: string;
        shades: Array<{
            color: string;
            name: string;
        }>;
    }>;
}
interface GrafanaTheme2 {
    name: string;
    isDark: boolean;
    isLight: boolean;
    colors: ThemeColors$1;
    spacing: ThemeSpacing;
    shape: {
        radius: {
            default: string;
            sm: string;
            md: string;
            lg: string;
            pill: string;
            circle: string;
        };
    };
    typography: ThemeTypography;
    zIndex: Record<string, number>;
    shadows: Record<string, string>;
    transitions: {
        duration: {
            short: string;
            medium: string;
            long: string;
        };
        easing: {
            easeInOut: string;
        };
    };
    visualization: ThemeVisualizationColors$1;
    components: ThemeComponents;
    flags: {
        visualDesignRefresh?: boolean;
    };
    breakpoints: {
        values: Record<string, number>;
        up: (key: string) => string;
        down: (key: string) => string;
    };
}

interface CreateThemeOptions {
    name?: string;
    colors?: {
        mode?: ThemeMode;
    };
    flags?: {
        visualDesignRefresh?: boolean;
    };
}
declare function createTheme(options?: CreateThemeOptions): GrafanaTheme2;

/** Map Theme2 to CSS custom properties on an element (~60 tokens). */
declare function applyTheme2CssVars(theme: GrafanaTheme2, el?: HTMLElement): void;

/** Global CSS string aligned with Grafana GlobalStyles/elements + typography. */
declare function createGlobalStyles(theme: GrafanaTheme2): string;
declare function applyGlobalStyles(theme: GrafanaTheme2, doc?: Document): void;

type ThemePreference = ThemeMode | "system";
declare function resolveThemeMode(pref: ThemePreference, mql?: MediaQueryList | {
    matches: boolean;
}): ThemeMode;
declare function createThemeFromPreference(pref: ThemePreference, options?: Omit<CreateThemeOptions, "colors"> & {
    visualDesignRefresh?: boolean;
}): GrafanaTheme2;
declare function applyResolvedTheme(theme: GrafanaTheme2, el?: HTMLElement): void;
declare function watchSystemTheme(cb: (mode: ThemeMode) => void): () => void;

declare function hexToRgb(color: string): string;
declare function rgbToHex(color: string): string;
declare function asHexString(color: string): string;
declare function asRgbString(color: string): string;
declare function hslToRgb(color: string | DecomposeColor): string;
interface DecomposeColor {
    type: string;
    values: any;
    colorSpace?: string;
}
declare function decomposeColor(color: string | DecomposeColor): DecomposeColor;
declare function recomposeColor(color: DecomposeColor): string;
declare function getContrastRatio(foreground: string, background: string, canvas?: string): number;
declare function getLuminance(color: string, background?: string): number;
declare function emphasize(color: string, coefficient?: number): string;
declare function alpha(color: string, value: number): string;
declare function darken(color: string, coefficient: number): string;
declare function lighten(color: string, coefficient: number): string;
declare function getContrastText(background: string, darkText?: string, lightText?: string, threshold?: number): string;
declare const colorManipulator: {
    hexToRgb: typeof hexToRgb;
    rgbToHex: typeof rgbToHex;
    asHexString: typeof asHexString;
    asRgbString: typeof asRgbString;
    hslToRgb: typeof hslToRgb;
    decomposeColor: typeof decomposeColor;
    recomposeColor: typeof recomposeColor;
    getContrastRatio: typeof getContrastRatio;
    getLuminance: typeof getLuminance;
    emphasize: typeof emphasize;
    alpha: typeof alpha;
    darken: typeof darken;
    lighten: typeof lighten;
    getContrastText: typeof getContrastText;
};

/** Upstream Grafana palette — gray05→gray100 + dark/light semantic mains. */
declare const palette: {
    readonly white: "#ffffff";
    readonly black: "#000000";
    readonly gray05: "#111217";
    readonly gray10: "#181b1f";
    readonly gray15: "#22252b";
    readonly gray20: "#2c2f35";
    readonly gray25: "#383b42";
    readonly gray30: "#44474e";
    readonly gray35: "#51555b";
    readonly gray40: "#5f6268";
    readonly gray45: "#6e7177";
    readonly gray50: "#7d8085";
    readonly gray55: "#8c8f94";
    readonly gray60: "#9c9fa3";
    readonly gray65: "#ababaf";
    readonly gray70: "#babcbe";
    readonly gray75: "#c8cacc";
    readonly gray80: "#d6d7d9";
    readonly gray85: "#e1e2e3";
    readonly gray90: "#ececed";
    readonly gray95: "#f4f5f5";
    readonly gray100: "#fbfbfb";
    readonly blueDarkMain: "#3d71d9";
    readonly blueDarkText: "#6e9fff";
    readonly redDarkMain: "#d10e5c";
    readonly redDarkText: "#ff5286";
    readonly greenDarkMain: "#1a7f4b";
    readonly greenDarkText: "#6ccf8e";
    readonly orangeDarkMain: "#ff9900";
    readonly orangeDarkText: "#fbad37";
    readonly purpleDarkMain: "#C27AFF";
    readonly purpleDarkText: "#D4A0FF";
    readonly blueLightMain: "#3871dc";
    readonly blueLightText: "#1f62e0";
    readonly redLightMain: "#e0226e";
    readonly redLightText: "#cf0e5B";
    readonly greenLightMain: "#1b855e";
    readonly greenLightText: "#0a764e";
    readonly orangeLightMain: "#ff9900";
    readonly orangeLightText: "#B04E0C";
    readonly purpleLightMain: "#A24BC8";
    readonly purpleLightText: "#7c2ea3";
};
type PaletteKey = keyof typeof palette;

interface ThemeColorsBase {
    mode: ThemeMode;
    primary: ThemeRichColor;
    secondary: ThemeRichColor;
    tertiary: ThemeRichColor;
    accent: ThemeRichColor;
    info: ThemeRichColor;
    error: ThemeRichColor;
    success: ThemeRichColor;
    warning: ThemeRichColor;
    text: {
        primary: string;
        secondary: string;
        disabled: string;
        link: string;
        maxContrast: string;
    };
    background: {
        canvas: string;
        page: string;
        primary: string;
        secondary: string;
        elevated: string;
    };
    border: {
        weak: string;
        medium: string;
        strong: string;
    };
    gradients: {
        brandVertical: string;
        brandHorizontal: string;
    };
    action: {
        selected: string;
        selectedBorder: string;
        hover: string;
        hoverOpacity: number;
        focus: string;
        disabledBackground: string;
        disabledText: string;
        disabledOpacity: number;
    };
    scrollbar: string;
    hoverFactor: number;
    contrastThreshold: number;
    tonalOffset: number;
}
interface ThemeColors extends ThemeColorsBase {
    getContrastText(background: string, threshold?: number): string;
    emphasize(color: string, amount?: number): string;
}
declare function createColors(mode: ThemeMode): ThemeColors;

declare const FALLBACK_COLOR = "#808080";
interface ThemeVizShade {
    color: string;
    name: string;
    aliases?: string[];
    primary?: boolean;
}
interface ThemeVizHue {
    name: string;
    shades: ThemeVizShade[];
}
interface ThemeVisualizationColors {
    palette: string[];
    getColorByName: (color: string) => string;
    hues: ThemeVizHue[];
}
declare function createVisualizationColors(colors: ThemeColors): ThemeVisualizationColors;

export { CLASSIC_PALETTE, CLASSIC_PALETTE_DARK, CLASSIC_PALETTE_LIGHT, DATA_TRANSFORMER_IDS, DataLinkBuiltInVars, DataTransformerID, FALLBACK_COLOR, FieldMatcherID, FieldNamePickerBaseNameMode, LoadingStateEnum, ReducerID, STANDARD_OVERRIDE_PROCESSORS, V1_SCHEMA_VERSION, VariableOrigin, VariableSuggestionsScope, alpha, applyDocumentPatches, applyFieldOverrides, applyGlobalStyles, applyJsonPatch, applyProcessedProperty, applyResolvedTheme, applyTheme2CssVars, applyTransformations, applyTransformationsWithTrace, applyValueMappings, asHexString, asRgbString, buildDataLinkUrl, buildDataLinkVars, colorManipulator, continuousGrYlRd, convertV2DashboardToV1, createColors, createDataFrame, createGlobalStyles, createTheme, createThemeFromPreference, createVisualizationColors, darken, dashboardRoundTrip, dateTime, decomposeColor, defaultRefreshIntervals, detectSourceKind, diffJsonPaths, displayValueToString, emphasize, flattenV2Layout, formatLabels, formatSuggestionToken, formatUnit, formatValue, formatValueWithUnit, formattedValueToString, frameFingerprint, frameHasName, getActiveThreshold, getAtPath, getClassicPalette, getContrastRatio, getContrastText, getDashboardLinkUrl, getDataFrameVars, getDataLinksVariableSuggestions, getDisplayProcessor, getFieldColor, getFieldDisplayName, getFieldLinks, getFieldMatcher, getFieldMatcherInfo, getFieldNameOptions, getFieldSeriesColor, getFrameFieldsDisplayNames, getInterval, getLuminance, getOverrideProcessor, getRawDisplayProcessor, getTemplateVariableSuggestions, getThresholdColor, getTransformer, getValueFormat, groupLabelForScope, hexToRgb, hslToRgb, interpolateDataLinkString, intervalToMs, isKnownOverrideProperty, isV2Dashboard, lighten, listFieldMatchers, listOverridePickerMatchers, listReducerIds, listStandardTransformers, listTransformerIds, listValueFormatIds, matchField, matchFieldWithRegistry, matchFrameFilter, migrateDashboard, migrateV1Dashboard, normalizeBaseNameMode, normalizeDashboard, normalizeDataFrames, palette, parseDashboardDocument, parsePath, preProcessPanelData, preserveUnknownFields, processOverrideValue, rangeUtil_parse, recomposeColor, reduceField, reduceField$1 as reduceFieldFromRegistry, registerTransformer, removeAtPath, resolveDataLink, resolveThemeMode, resolveThemeModeHint, resolveTransformerId, resolveV2Datasource, resolveVizColor, rgbToHex, runMigrations, setAtPath, sortThresholds, standardTransformers, stringToMs, toDataFrameDTO, toSerializableDashboard, v1Migrations, v2ResourceToV1, watchSystemTheme };
export type { AbsoluteTimeRange, AnnotationQuery, ApplyTransformationsContext, ConfigOverrideRule, CreateThemeOptions, DashboardDocumentEnvelope, DashboardModel, DashboardSourceKind, DataFrame, DataLink, DataLinkVars, DataQuery, DataSourceJsonData, DataSourceSettings, DecimalCount, DecomposeColor, DisplayProcessor, DisplayValue, DynamicConfigValue, Field, FieldCalcs, FieldConfig, FieldMatcherFn, FieldMatcherInfo, FieldType, FrameFieldsDisplayNames, FrameFilterConfig, FrameNormalizationContext, GrafanaTheme2, GridPos, JsonPatchOp, LayoutItem, LayoutRow, LoadingState, LoadingStateValue, MatcherConfig, MatcherScope, PaletteKey, PanelData, PanelDataLike, PanelLoadingState, PanelModel, ResolveDataLinkContext, ScopedVars, ThemeColors, ThemeColorsBase, ThemeMode, ThemePreference, ThemeRichColor, ThemeSpacing, ThemeTypography, ThemeVisualizationColors$1 as ThemeVisualizationColors, ThemeVizHue, ThemeVizShade, Threshold, ThresholdsConfig, TimeRange, TimeZone, TransformDiagnostic, TransformPipelineResult, TransformStepSnapshot, TransformerFn, V2DashboardKind, ValueMapping, VariableModel, VariableSuggestion, VariableType };

// ----- @grafana/plugin-sdk -----
/**
 * Panel options UI builder (Task 5.1).
 * Mirrors Grafana PanelOptionsEditorBuilder without React/Zod.
 */
declare class OptionsUIBuilder<TOptions = Record<string, unknown>> {
    descriptors: OptionDescriptor<TOptions>[];
    defaults: Record<string, unknown>;
    private orderSeq;
    getItems(): OptionDescriptor<TOptions>[];
    private add;
    addBoolean(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: boolean): this;
    addRadio(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addSelect(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addMultiSelect(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addNumber(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: number): this;
    addSlider(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: number): this;
    addText(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addTextArea(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addStrings(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string[]): this;
    addColor(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addUnit(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addFieldColor(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addThresholds(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addMappings(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addLinks(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addActions(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addStatsPicker(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: unknown): this;
    addTimezone(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addFieldName(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addDashboardUid(d: Omit<OptionDescriptor<TOptions>, "editor">, defaultValue?: string): this;
    addCustomEditor(d: Omit<OptionDescriptor<TOptions>, "editor"> & {
        editor?: OptionEditorKind;
        customEditor?: Component;
    }, defaultValue?: unknown): this;
    /**
     * Back-compat: full descriptor with explicit editor (used by commonBuilders / panels).
     */
    addCustom(d: OptionDescriptor<TOptions> | (Omit<OptionDescriptor<TOptions>, "editor"> & {
        editor?: OptionEditorKind;
    }), defaultValue?: unknown): this;
    /**
     * Nested option group — stores nested descriptor; children resolved by consumer via nested.build.
     */
    addNestedOptions(cfg: NestedPanelOptionsDescriptor): this;
    /** Filter visible descriptors for a live context */
    static filterVisible<TOptions>(items: OptionDescriptor<TOptions>[], options: TOptions, context: StandardEditorContext<TOptions>): OptionDescriptor<TOptions>[];
    static isDisabled<TOptions>(d: OptionDescriptor<TOptions>, options: TOptions, context: StandardEditorContext<TOptions>): boolean;
}

/**
 * Standard option editors — aligned with Grafana getAllOptionEditors()
 * @see grafana-main/public/app/core/components/OptionsUI/registry.tsx
 */
type OptionEditorKind = "boolean" | "radio" | "select" | "multi-select" | "number" | "slider" | "text" | "textarea" | "strings" | "color" | "fieldColor" | "unit" | "thresholds" | "mappings" | "links" | "actions" | "stats-picker" | "timezone" | "field-name" | "dashboard-uid" | "nested" | "custom";
/** editorKey used by OptionsUI registry (may equal OptionEditorKind or custom id). */
type OptionEditorKey = OptionEditorKind | (string & {});
/**
 * Grafana StandardEditorContext — options/field editors receive this.
 * @see grafana-main/packages/grafana-data/src/field/standardFieldConfigEditorRegistry.ts
 */
interface StandardEditorContext<TOptions = Record<string, unknown>, TState = unknown> {
    data: DataFrame[];
    annotations?: DataFrame[];
    replaceVariables?: (value: string, scopedVars?: Record<string, unknown>, format?: string | Function) => string;
    eventBus?: {
        publish: (event: string, payload?: unknown) => void;
        subscribe: (event: string, handler: (payload?: unknown) => void) => () => void;
    };
    getSuggestions?: (scope?: string) => unknown[];
    options?: TOptions;
    instanceState?: TState;
    isOverride?: boolean;
}
declare function createEmptyEditorContext<TOptions = Record<string, unknown>>(partial?: Partial<StandardEditorContext<TOptions>>): StandardEditorContext<TOptions>;
/**
 * Full option descriptor (Task 5.1).
 * Fields align with Grafana OptionEditorConfig + OptionsEditorItem + field override extras.
 */
interface OptionDescriptor<TOptions = Record<string, unknown>, TValue = unknown, TSettings = Record<string, unknown>> {
    id: string;
    path: string;
    name: string;
    description?: string;
    category: string[];
    /** @deprecated prefer editorKey — kept for existing modules */
    editor: OptionEditorKind;
    /** Registry lookup key; defaults to `editor` */
    editorKey?: OptionEditorKey;
    defaultValue?: TValue;
    settings?: TSettings;
    order?: number;
    showIf?: (options: TOptions, data?: DataFrame[], annotations?: DataFrame[]) => boolean | undefined;
    disableIf?: (options: TOptions, data?: DataFrame[], annotations?: DataFrame[]) => boolean | undefined;
    /** Field-config style: whether property applies to a field */
    shouldApply?: (field: unknown) => boolean;
    /** Process override / raw value into typed value */
    process?: (value: unknown, context: StandardEditorContext<TOptions>, settings?: TSettings) => TValue | undefined | null;
    hideFromDefaults?: boolean;
    hideFromOverrides?: boolean;
    useFieldset?: boolean;
    getItemsCount?: (value?: TValue) => number;
    nested?: NestedPanelOptionsDescriptor;
    /** Override editor component or editorKey when different from defaults editor */
    overrideEditor?: Component | OptionEditorKey;
    /** Paths of options this editor depends on for showIf/disableIf invalidation */
    contextDependencies?: string[];
    /** Runtime consumer evidence role */
    consumer?: {
        sourcePaths?: string[];
        stages?: string[];
    };
    /** Compatibility-only path (serializer round-trip, not rendered) */
    compatibilityRole?: "serializer" | "migration" | "none";
    allowOverride?: boolean;
    customEditor?: Component;
}
interface NestedPanelOptionsDescriptor<TSub = unknown> {
    path: string;
    category?: string[];
    defaultValue?: TSub;
    /** Nested builder supplier runs with sub-context */
    build?: (builder: unknown, context: StandardEditorContext<TSub>) => void;
}
interface FieldConfigDescriptor<TOptions = Record<string, unknown>, TValue = unknown, TSettings = Record<string, unknown>> {
    id: string;
    path: string;
    name: string;
    description?: string;
    category?: string[];
    editor: OptionEditorKind;
    editorKey?: OptionEditorKey;
    defaultValue?: TValue;
    settings?: TSettings;
    isCustom?: boolean;
    override?: boolean;
    showIf?: (fieldConfig: Record<string, unknown>, data?: DataFrame[]) => boolean | undefined;
    disableIf?: (fieldConfig: Record<string, unknown>, data?: DataFrame[]) => boolean | undefined;
    shouldApply?: (field: unknown) => boolean;
    process?: (value: unknown, context: StandardEditorContext<TOptions>, settings?: TSettings) => TValue | undefined | null;
    hideFromDefaults?: boolean;
    hideFromOverrides?: boolean;
    useFieldset?: boolean;
    getItemsCount?: (value?: TValue) => number;
    overrideEditor?: Component | OptionEditorKey;
    order?: number;
}
/** Standard field config property ids (Grafana FieldConfigProperty subset). */
type FieldConfigPropertyId = "unit" | "min" | "max" | "fieldMinMax" | "decimals" | "displayName" | "noValue" | "color" | "thresholds" | "mappings" | "links" | "actions" | "filterable" | string;
interface StandardOptionConfig {
    name?: string;
    description?: string;
    category?: string[];
    defaultValue?: unknown;
    settings?: Record<string, unknown>;
    hideFromDefaults?: boolean;
}
type PanelOptionsSupplier<TOptions> = (builder: OptionsUIBuilder<TOptions>, context: StandardEditorContext<TOptions>) => void;

interface PanelProps<TOptions = Record<string, unknown>> {
    id: number;
    data: PanelData;
    options: TOptions;
    fieldConfig: {
        defaults: FieldConfig;
        overrides: unknown[];
    };
    width: number;
    height: number;
    timeRange: TimeRange;
    replaceVariables: (value: string) => string;
    title?: string;
    transparent?: boolean;
}
interface PanelPluginMeta {
    id: string;
    name: string;
    description?: string;
    state?: "alpha" | "beta" | "stable" | "deprecated";
    skipDataQuery?: boolean;
}
type PanelModelLike = Record<string, unknown> & {
    type?: string;
    options?: Record<string, unknown>;
};
type PanelMigrationHandler = (panel: PanelModelLike) => PanelModelLike;
interface PanelPluginModule<TOptions = Record<string, unknown>> {
    meta: PanelPluginMeta;
    panel: Component;
    optionsEditor?: Component;
    fieldConfigEditor?: Component;
    defaultOptions?: TOptions;
    optionDescriptors?: OptionDescriptor<TOptions>[];
    /** Stored supplier for context-aware re-resolution */
    optionsSupplier?: PanelOptionsSupplier<TOptions>;
    /** Grafana setNoPadding — content has no chrome padding */
    noPadding?: boolean;
    fieldConfigDescriptors?: FieldConfigDescriptor[];
    standardFieldConfig?: boolean;
    migrateOptions?: (options: Record<string, unknown>, fieldConfig?: unknown) => {
        options: TOptions;
        fieldConfig?: unknown;
    };
    migratePanel?: PanelMigrationHandler;
    panelChangeHandler?: (panel: Record<string, unknown>, prevPluginId?: string, prevOptions?: Record<string, unknown>) => Record<string, unknown>;
    /** Runtime-consumed option paths for capability evidence */
    runtimeConsumedPaths?: string[];
    defaultFieldConfigCustom?: Record<string, unknown>;
    dataSupport?: {
        annotations?: boolean;
        alertStates?: boolean;
    };
}
type TelemetrySignal = "metrics" | "logs" | "traces";
interface DataSourceCapabilities {
    signals: TelemetrySignal[];
    query: boolean;
    health: boolean;
    metadata: boolean;
    variables: boolean;
    annotations: boolean;
    exemplars: boolean;
    streaming: boolean;
    queryLanguages: string[];
}
interface RuntimeCredential {
    kind: "bearer" | "basic" | "apiKey" | "headers";
    value?: string;
    username?: string;
    password?: string;
    headers?: Record<string, string>;
    headerName?: string;
}
interface DataSourceRequestContext {
    signal: AbortSignal;
    interpolate: (value: string) => string;
    credential: RuntimeCredential | null;
}
declare function assertSignalSupported(caps: DataSourceCapabilities | undefined, signal: TelemetrySignal): void;
interface DataSourcePluginMeta {
    id: string;
    name: string;
    description?: string;
    metrics?: boolean;
    logs?: boolean;
    tracing?: boolean;
    alerting?: boolean;
    backend?: boolean;
    /** Execution/UI capability source of truth */
    capabilities?: DataSourceCapabilities;
}
interface QueryEditorProps<TQuery extends DataQuery = DataQuery> {
    query: TQuery;
    onChange: (query: TQuery) => void;
    onRunQuery: () => void;
    datasource: DataSourceInstanceSettings;
    range?: TimeRange;
}
interface DataSourceMutationRequest<TPayload = unknown> {
    action: string;
    payload: TPayload;
    signal?: AbortSignal;
}
interface DataSourceMutationResult<TData = unknown> {
    status: "success" | "error";
    message: string;
    data?: TData;
}
interface ScopedVariable {
    text: string | string[];
    value: string | string[];
}
interface DataSourceQueryRequest<TQuery extends DataQuery = DataQuery> {
    requestId: string;
    targets: TQuery[];
    range: TimeRange;
    maxDataPoints?: number;
    intervalMs?: number;
    scopedVars?: Record<string, ScopedVariable>;
    /** Progressive partial frames while a query is still running (no RxJS). */
    onPartialData?: (series: DataFrame[]) => void;
}
interface MetricFindQueryContext {
    range?: TimeRange;
    scopedVars?: Record<string, ScopedVariable>;
}
interface DataSourcePluginApi<TQuery extends DataQuery = DataQuery, TMetadataRequest = unknown, TMetadataResponse = unknown> {
    id?: number;
    uid?: string;
    type?: string;
    name?: string;
    capabilities?: DataSourceCapabilities;
    query: (request: DataSourceQueryRequest<TQuery>, signal?: AbortSignal) => Promise<{
        data: DataFrame[];
    }>;
    testDatasource?: (signal?: AbortSignal) => Promise<{
        status: string;
        message: string;
    }>;
    metricFindQuery?: (query: unknown, signal?: AbortSignal, context?: MetricFindQueryContext) => Promise<Array<{
        text: string;
        value: string;
        id?: string;
    }>>;
    annotationQuery?: (request: {
        range: TimeRange;
        annotation: Record<string, unknown>;
    }, signal?: AbortSignal) => Promise<DataFrame[] | DataFrame>;
    getMetadata?: (request: TMetadataRequest, signal?: AbortSignal) => Promise<TMetadataResponse>;
    mutate?: (request: DataSourceMutationRequest) => Promise<DataSourceMutationResult>;
    dispose?: () => void;
}
interface DataSourceConfigValidation {
    isValid: boolean;
    message?: string;
}
interface ConfigEditorProps<T extends DataSourceJsonData = DataSourceJsonData> {
    options: DataSourceSettings<T>;
    onOptionsChange: (options: DataSourceSettings<T>) => void;
    onValidationChange?: (validation: DataSourceConfigValidation) => void;
}
interface DataSourceInstanceSettings {
    id?: number;
    uid: string;
    type: string;
    name: string;
    url?: string;
    access?: string;
    jsonData: DataSourceJsonData;
    meta: DataSourcePluginMeta;
}
interface DataSourcePluginModule<TQuery extends DataQuery = DataQuery, _TJson extends DataSourceJsonData = DataSourceJsonData, TMetadataRequest = unknown, TMetadataResponse = unknown> {
    meta: DataSourcePluginMeta;
    QueryEditor: Component;
    ConfigEditor?: Component;
    VariableQueryEditor?: Component;
    AnnotationQueryEditor?: Component;
    createDataSource: (instance: DataSourceInstanceSettings) => DataSourcePluginApi<TQuery, TMetadataRequest, TMetadataResponse>;
}
type PluginKind = "panel" | "datasource";

declare function registerPanelPlugin(plugin: PanelPluginModule, opts?: {
    overwrite?: boolean;
}): void;
declare function registerDataSourcePlugin(plugin: DataSourcePluginModule, opts?: {
    overwrite?: boolean;
}): void;
declare function getPanelPlugin(id: string): PanelPluginModule | undefined;
declare function getDataSourcePlugin(id: string): DataSourcePluginModule | undefined;
declare function listPanelPlugins(): PanelPluginModule[];
declare function listDataSourcePlugins(): DataSourcePluginModule[];
declare function clearPluginRegistries(): void;
declare function assertNoReactPlugins(modules: Array<{
    id: string;
    framework?: string;
}>): void;

declare function createPanelPlugin<TOptions = Record<string, unknown>>(meta: PanelPluginMeta, panel: Component, extras?: Partial<Omit<PanelPluginModule<TOptions>, "meta" | "panel">>): PanelPluginModule<TOptions>;
declare function createDataSourcePlugin<TQuery extends DataQuery = DataQuery, TJson extends DataSourceJsonData = DataSourceJsonData>(module: DataSourcePluginModule<TQuery, TJson>): DataSourcePluginModule<TQuery, TJson>;
declare function buildPluginMeta(id: string, name: string, rest?: Partial<DataSourcePluginMeta>): DataSourcePluginMeta;
/** @deprecated prefer buildStandardFieldConfigDescriptors — kept for call sites */
declare const STANDARD_FIELD_CONFIG: FieldConfigDescriptor[];
declare class FieldConfigBuilder {
    descriptors: FieldConfigDescriptor[];
    customDefaults: Record<string, unknown>;
    addCustom(d: FieldConfigDescriptor): this;
    addBoolean(d: Omit<FieldConfigDescriptor, "editor" | "isCustom">, defaultValue?: boolean): this;
    addRadio(d: Omit<FieldConfigDescriptor, "editor" | "isCustom">, defaultValue?: unknown): this;
    addSelect(d: Omit<FieldConfigDescriptor, "editor" | "isCustom">, defaultValue?: unknown): this;
    addNumber(d: Omit<FieldConfigDescriptor, "editor" | "isCustom">, defaultValue?: number): this;
    addSlider(d: Omit<FieldConfigDescriptor, "editor" | "isCustom">, defaultValue?: number): this;
    addText(d: Omit<FieldConfigDescriptor, "editor" | "isCustom">, defaultValue?: string): this;
}
declare class VuePanelPlugin<TOptions = Record<string, unknown>> {
    private module;
    private optionsSupplier?;
    constructor(meta: PanelPluginMeta, panel: Component);
    setPanel(panel: Component): this;
    setNoPadding(): this;
    setDataSupport(_support: {
        annotations?: boolean;
        alertStates?: boolean;
    }): this;
    useFieldConfig(opts?: {
        standard?: boolean;
        /** Per-id patches (Grafana standardOptions record form) */
        standardOptions?: Partial<Record<FieldConfigPropertyId, StandardOptionConfig>>;
        disableStandardOptions?: FieldConfigPropertyId[];
        useCustomConfig?: (builder: FieldConfigBuilder) => void;
    }): this;
    /**
     * Grafana-compatible setPanelOptions(builder, context).
     * Supplier is stored; defaults/descriptors resolved once with empty context at register.
     */
    setPanelOptions(builderFn: PanelOptionsSupplier<TOptions> | ((builder: OptionsUIBuilder<TOptions>) => void)): this;
    /** Re-resolve descriptors with live StandardEditorContext (showIf/disableIf with data). */
    resolveOptionDescriptors(context?: StandardEditorContext<TOptions>): OptionDescriptor<TOptions>[];
    setMigrationHandler(fn: PanelPluginModule<TOptions>["migrateOptions"]): this;
    setPanelMigrationHandler(fn: PanelPluginModule<TOptions>["migratePanel"]): this;
    setPanelChangeHandler(fn: PanelPluginModule<TOptions>["panelChangeHandler"]): this;
    setRuntimeConsumedPaths(paths: string[]): this;
    setOptionsEditor(editor: Component): this;
    setFieldConfigEditor(editor: Component): this;
    register(): PanelPluginModule<Record<string, unknown>>;
    getModule(): PanelPluginModule<TOptions>;
}
/** Resolve option descriptors for a registered plugin module with live context. */
declare function resolvePluginOptionDescriptors<TOptions = Record<string, unknown>>(plugin: PanelPluginModule<TOptions>, context?: StandardEditorContext<TOptions>): OptionDescriptor<TOptions>[];

/** Vue plugin ABI major. Bump only on breaking renderer/props contracts. */
declare const VUE_PLUGIN_ABI_MAJOR = 1;
interface PluginJsonManifest {
    id?: string;
    type?: string;
    info?: {
        version?: string;
    };
    dependencies?: {
        grafanaDependency?: string;
        grafanaVersion?: string;
        plugins?: unknown[];
        /** Required for frontend plugins in this fork */
        vueSdkMajor?: number;
    };
    backend?: boolean;
}
declare function assertVuePluginAbi(manifest: PluginJsonManifest, expectedMajor?: number): void;
declare function isVuePluginManifest(manifest: PluginJsonManifest): boolean;

declare function splitOptionPath(path: string): Array<string | number>;
declare function getOptionPath(source: unknown, path: string): unknown;
declare function setOptionPath<T>(source: T, path: string, value: unknown): T;

/**
 * Grafana fieldConfig.custom object shapes — editors often emit plain strings;
 * schema uses objects. Coerce on write + display so radio/select controls work.
 */
type HideFromConfig = {
    tooltip: boolean;
    viz: boolean;
    legend: boolean;
};
type ScaleDistributionConfig = {
    type: string;
    log?: number;
    linearThreshold?: number;
};
type StackingConfig = {
    mode: string;
    group: string;
};
type ThresholdsStyleConfig = {
    mode: string;
};
declare function normalizeHideFrom(raw: unknown): HideFromConfig;
declare function normalizeScaleDistribution(raw: unknown): ScaleDistributionConfig;
declare function normalizeStacking(raw: unknown): StackingConfig;
declare function normalizeThresholdsStyle(raw: unknown): ThresholdsStyleConfig;
/** Coerce radio/select writes into Grafana JSON shapes. */
declare function coerceFieldConfigEditorValue(path: string, value: unknown, previous?: unknown): unknown;
/** Radio/select display value for object-shaped configs. */
declare function radioDisplayValue(path: string, value: unknown): unknown;

/** Align with grafana-ui options/builder/legend.tsx */
declare function addLegendOptions(builder: OptionsUIBuilder, includeCalcs?: boolean, includeWidth?: boolean): OptionsUIBuilder<Record<string, unknown>>;

/** Align with grafana-ui options/builder/tooltip.tsx */
declare function addTooltipOptions(builder: OptionsUIBuilder, singleOnly?: boolean, includeHideZeros?: boolean): OptionsUIBuilder<Record<string, unknown>>;

/** Graph field custom axis paths (stored under fieldConfig.defaults.custom) */
declare function addAxisConfig(builder: FieldConfigBuilder): FieldConfigBuilder;

declare function addStackingConfig(builder: FieldConfigBuilder): FieldConfigBuilder;

/** Timeseries-family graph field config (Grafana timeseries/config.ts) */
declare function addGraphFieldConfig(builder: FieldConfigBuilder): FieldConfigBuilder;

/** Align with grafana-ui options/builder/text.tsx */
declare function addTextSizeOptions(builder: OptionsUIBuilder, opts?: {
    withTitle?: boolean;
    withValue?: boolean;
    withPercentChange?: boolean;
}): OptionsUIBuilder<Record<string, unknown>>;

/** Align with grafana-ui options/builder/hideSeries.tsx addHideFrom */
declare function addHideFrom(builder: FieldConfigBuilder): FieldConfigBuilder;

/** Align with grafana-main features/panel/options/builder/annotations.ts */
declare function addAnnotationOptions(builder: OptionsUIBuilder): OptionsUIBuilder<Record<string, unknown>>;

type RuntimeDataSourceApi = DataSourcePluginApi<any, any, any>;
declare function registerRuntimeDataSource(uid: string, api: RuntimeDataSourceApi): void;
declare function getRuntimeDataSource(uid: string): RuntimeDataSourceApi | undefined;
declare function listRuntimeDataSources(): RuntimeDataSourceApi[];
declare function unregisterRuntimeDataSource(uid: string): void;
declare function clearRuntimeDataSources(): void;

/**
 * editorKey -> Vue component / async loader.
 * Must NOT store panel ids, defaults, or option schemas (Task 5.1).
 */
type EditorLoader = Component | (() => Promise<{
    default: Component;
} | Component>);
declare function registerOptionEditor(editorKey: OptionEditorKey, loader: EditorLoader): void;
declare function getOptionEditor(editorKey: OptionEditorKey): EditorLoader | undefined;
declare function listOptionEditorKeys(): string[];
declare function clearOptionEditorRegistry(): void;
/**
 * Strict profile: unknown editorKey fails immediately.
 */
declare function resolveOptionEditor(editorKey: OptionEditorKey, { strict }?: {
    strict?: boolean | undefined;
}): EditorLoader;
/** Built-in editor keys that OptionsPane branches handle without Vue registry components. */
declare const BUILTIN_OPTION_EDITOR_KEYS: OptionEditorKey[];
declare function isKnownEditorKey(editorKey: string, registeredOnly?: boolean): boolean;
declare function countUnknownEditors(editorKeys: string[], { strictBuiltins }?: {
    strictBuiltins?: boolean;
}): number;

/**
 * Standard field config registry (Task 5.3).
 * Supersedes inline STANDARD_FIELD_CONFIG list with id/process/hide flags.
 */

interface StandardFieldConfigItem {
    id: FieldConfigPropertyId | string;
    path: string;
    name: string;
    description?: string;
    category: string[];
    editor: FieldConfigDescriptor["editor"];
    editorKey?: string;
    override?: boolean;
    hideFromDefaults?: boolean;
    hideFromOverrides?: boolean;
    defaultValue?: unknown;
}
declare function listStandardFieldConfigItems(): StandardFieldConfigItem[];
declare function buildStandardFieldConfigDescriptors(opts?: {
    standardOptions?: Partial<Record<string, StandardOptionConfig>>;
    disableStandardOptions?: string[];
}): FieldConfigDescriptor[];
/** Picker entries for override property select (standard only; custom appended by consumer). */
declare function listStandardOverridePropertyOptions(): Array<{
    value: string;
    label: string;
}>;

/**
 * Shared observability capability descriptor types.
 * Pure data contracts — no Vue, runtime instances, or dashboard imports.
 */
type CapabilitySignal = "metrics" | "logs" | "traces" | "events" | "problems" | "topology";
interface CapabilityConfigSection {
    id: string;
    name: string;
    fields: string[];
    required?: boolean;
}
interface CapabilityProfile {
    id: string;
    name: string;
    signals: CapabilitySignal[];
    queryModes: string[];
    healthPaths?: string[];
}
interface CapabilityQueryMode {
    id: string;
    name: string;
    signal: CapabilitySignal;
    requestTypes?: string[];
    notes?: string;
}
interface CapabilityDataKind {
    id: string;
    name: string;
    signal: CapabilitySignal;
    requiredCapabilities: string[];
    queryModeIds: string[];
    semanticKind: string;
    preferredVisualisationType: string;
    fields: Array<{
        name: string;
        type: string;
        required: boolean;
    }>;
    recommendedPanels: string[];
    supportedPanels: string[];
    fixture: string;
    liveEvidenceCase: string;
}
interface DatasourceCapabilityManifest {
    datasourceType: string;
    displayName: string;
    configSections: CapabilityConfigSection[];
    profiles: CapabilityProfile[];
    queryModes: CapabilityQueryMode[];
    dataKinds: CapabilityDataKind[];
    processingFunctions?: string[];
    actions?: string[];
}
type PanelCompatibilityLevel = "recommended" | "supported" | "unsupported";
interface PanelCompatibilityEntry {
    panelId: string;
    displayName: string;
    level: PanelCompatibilityLevel;
    reason: string;
    requiredSchema: string[];
    dataKindIds: string[];
    fixture?: string;
    liveEvidenceCase?: string;
}
interface ObservabilityCapabilityScenario {
    id: string;
    name: string;
    datasourceType: string;
    dataKindId: string;
    panelId: string;
    fixture: string;
    liveEvidenceCase: string;
}

export { BUILTIN_OPTION_EDITOR_KEYS, FieldConfigBuilder, OptionsUIBuilder as OptionsBuilder, OptionsUIBuilder, STANDARD_FIELD_CONFIG, VUE_PLUGIN_ABI_MAJOR, VuePanelPlugin, addAnnotationOptions, addAxisConfig, addGraphFieldConfig, addHideFrom, addLegendOptions, addStackingConfig, addTextSizeOptions, addTooltipOptions, assertNoReactPlugins, assertSignalSupported, assertVuePluginAbi, buildPluginMeta, buildStandardFieldConfigDescriptors, clearOptionEditorRegistry, clearPluginRegistries, clearRuntimeDataSources, coerceFieldConfigEditorValue, countUnknownEditors, createDataSourcePlugin, createEmptyEditorContext, createPanelPlugin, getDataSourcePlugin, getOptionEditor, getOptionPath, getPanelPlugin, getRuntimeDataSource, isKnownEditorKey, isVuePluginManifest, listDataSourcePlugins, listOptionEditorKeys, listPanelPlugins, listRuntimeDataSources, listStandardFieldConfigItems, listStandardOverridePropertyOptions, normalizeHideFrom, normalizeScaleDistribution, normalizeStacking, normalizeThresholdsStyle, radioDisplayValue, registerDataSourcePlugin, registerOptionEditor, registerPanelPlugin, registerRuntimeDataSource, resolveOptionEditor, resolvePluginOptionDescriptors, setOptionPath, splitOptionPath, unregisterRuntimeDataSource };
export type { CapabilityConfigSection, CapabilityDataKind, CapabilityProfile, CapabilityQueryMode, CapabilitySignal, ConfigEditorProps, DataSourceCapabilities, DataSourceConfigValidation, DataSourceInstanceSettings, DataSourceMutationRequest, DataSourceMutationResult, DataSourcePluginApi, DataSourcePluginMeta, DataSourcePluginModule, DataSourceQueryRequest, DataSourceRequestContext, DatasourceCapabilityManifest, EditorLoader, FieldConfigDescriptor, FieldConfigPropertyId, HideFromConfig, MetricFindQueryContext, NestedPanelOptionsDescriptor, ObservabilityCapabilityScenario, OptionDescriptor, OptionEditorKey, OptionEditorKind, PanelCompatibilityEntry, PanelCompatibilityLevel, PanelMigrationHandler, PanelModelLike, PanelOptionsSupplier, PanelPluginMeta, PanelPluginModule, PanelProps, PluginJsonManifest, PluginKind, QueryEditorProps, RuntimeCredential, ScaleDistributionConfig, ScopedVariable, StackingConfig, StandardEditorContext, StandardFieldConfigItem, StandardOptionConfig, TelemetrySignal, ThresholdsStyleConfig };

// ----- @grafana/runtime -----
export { AxiosAdapter, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios';

interface BootUser {
    id: number;
    isSignedIn: boolean;
    login: string;
    email: string;
    name: string;
    orgId: number;
    orgName: string;
    orgRole: string;
    isGrafanaAdmin: boolean;
    timezone: string;
    weekStart: string;
    language: string;
    theme: string;
    permissions: Record<string, boolean>;
}
interface BootData {
    user: BootUser;
    settings: {
        appSubUrl: string;
        buildInfo: {
            version: string;
            commit: string;
            env: string;
        };
        featureToggles: Record<string, boolean>;
        datasources: Record<string, unknown>;
        panels: Record<string, unknown>;
        minRefreshInterval: string;
    };
    navTree: unknown[];
}
declare function setBootData(boot: BootData): void;
declare function useBootData(): any;
declare function getBootData(): BootData;
declare function createDefaultBootData(partial?: Partial<BootData>): BootData;

interface BackendRequestOptions {
    method?: string;
    url: string;
    data?: unknown;
    params?: Record<string, string | number | boolean | undefined>;
    headers?: Record<string, string>;
    showErrorAlert?: boolean;
    showSuccessAlert?: boolean;
    signal?: AbortSignal;
}
interface BackendResponse<T = unknown> {
    data: T;
    status: number;
    statusText: string;
    ok: boolean;
    headers: Headers;
}
type BackendMode = "offline" | "live";
type FetchImpl = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
interface BackendAdapter {
    request<T = unknown>(opts: BackendRequestOptions): Promise<BackendResponse<T>>;
}

declare function resetOfflineStorage(): void;
declare const OFFLINE_STORAGE_KEYS: {
    readonly dashboards: "grafana-vue-imported-dashboards";
    readonly datasources: "grafana-vue-offline-datasources";
};

/** App registers live observability demo builders; offline seeds use them if present. */
type LiveDashboardSpec = Record<string, unknown> & {
    uid?: string;
    title?: string;
};
declare function registerLiveDashboardBuilders(next: Record<string, () => LiveDashboardSpec>): void;
declare function getLiveDashboardBuilders(): Record<string, () => LiveDashboardSpec>;

/**
 * Grafana-shaped backend facade.
 * Default mode is **offline** (pure frontend) — no real /api network.
 * Live mode only when configureBackendSrv({ mode: 'live' }).
 */

declare function getBackendMode(): BackendMode;
declare function configureBackendSrv(opts: {
    mode?: BackendMode;
    fetch?: FetchImpl;
    baseUrl?: string;
    adapter?: BackendAdapter | null;
    /** When true, live Grafana API calls require a token before send. */
    requireAuth?: boolean;
}): void;
declare function backendRequest<T = unknown>(opts: BackendRequestOptions): Promise<BackendResponse<T>>;
declare const backendSrv: {
    get: <T = unknown>(url: string, params?: BackendRequestOptions["params"], options?: Partial<BackendRequestOptions>) => Promise<BackendResponse<T>>;
    post: <T = unknown>(url: string, data?: unknown, options?: Partial<BackendRequestOptions>) => Promise<BackendResponse<T>>;
    put: <T = unknown>(url: string, data?: unknown, options?: Partial<BackendRequestOptions>) => Promise<BackendResponse<T>>;
    patch: <T = unknown>(url: string, data?: unknown, options?: Partial<BackendRequestOptions>) => Promise<BackendResponse<T>>;
    delete: <T = unknown>(url: string, options?: Partial<BackendRequestOptions>) => Promise<BackendResponse<T>>;
    request: typeof backendRequest;
    configure: typeof configureBackendSrv;
    getMode: typeof getBackendMode;
};

interface LocationState {
    path: string;
    query: Record<string, string | string[] | undefined>;
    hash: string;
}
declare function useLocationService(): {
    state: any;
    partial: (update: Partial<LocationState>) => void;
    push: (path: string, query?: LocationState["query"]) => void;
    replace: (path: string, query?: LocationState["query"]) => void;
    getSearchObject: () => any;
};

type ThemeMode = "light" | "dark" | "system";
type ThemePreference = ThemeMode;
declare const THEME_STORAGE_KEY = "grafana-vue-theme-preference";
type ThemeListener = (mode: ThemeMode$1) => void;
declare function onThemeChange(fn: ThemeListener): () => void;
/** Read URL ?theme= light|dark (runtimeOnly override, not persisted). */
declare function readUrlTheme(): ThemeMode$1 | null;
/**
 * Priority: URL ?theme= (runtimeOnly) > localStorage > bootData.user.theme > 'dark'
 */
declare function resolveInitialPreference(): {
    preference: ThemePreference;
    runtimeOnly?: ThemeMode$1;
};
/** Bootstrap theme once at app start. Call from index.ts. */
declare function initTheme(options?: {
    preference?: ThemePreference;
    runtimeOnly?: ThemeMode$1;
}): ThemeMode$1;
declare function useTheme(): {
    /** User preference including 'system' */
    mode: any;
    preference: any;
    /** Resolved light|dark */
    resolved: any;
    theme2: any;
    setMode: (mode: ThemePreference, opts?: {
        runtimeOnly?: boolean;
    }) => void;
    setRuntimeMode: (mode: ThemeMode$1) => void;
    tokens: any;
};

declare function hasPermission(action: string): boolean;
declare function usePermissions(): {
    can: typeof hasPermission;
    canReadDashboards: () => boolean;
    canWriteDashboards: () => boolean;
    canReadDatasources: () => boolean;
    canWriteDatasources: () => boolean;
};

declare function isFeatureEnabled(name: string): boolean;

interface QueryRequest extends DataSourceQueryRequest {
    panelId?: number;
    visible?: boolean;
}
type DataSourceApi = DataSourcePluginApi<any, any, any> & {
    uid: string;
    type: string;
    name: string;
};
type DataSourceResolver = (ref: {
    type?: string;
    uid?: string;
} | string | null | undefined) => DataSourceApi | undefined;
interface QuerySchedulerOptions {
    concurrency?: number;
    resolveDataSource: DataSourceResolver;
    cacheTtlMs?: number;
    maxCacheEntries?: number;
}
/**
 * Vue-native query scheduler (no RxJS).
 * Supports concurrency, cancel, cache, visibility skip, mixed DS fan-out.
 */
declare class QueryScheduler {
    private concurrency;
    private resolveDataSource;
    private cacheTtlMs;
    private maxCacheEntries;
    private active;
    private queue;
    private running;
    private cache;
    readonly stats: any;
    constructor(opts: QuerySchedulerOptions);
    run(request: QueryRequest): Promise<PanelData>;
    cancel(requestId: string): void;
    cancelAll(): void;
    clearCache(): void;
    private buildCacheKey;
    private putCache;
    private enqueue;
    private execute;
}

type Dict = Record<string, string>;
declare function setLocale(locale: string): void;
declare function setRTL(rtl: boolean): void;
declare function t(key: string, fallback?: string): string;
declare function useI18n(): {
    locale: any;
    rtl: any;
    t: typeof t;
    setLocale: typeof setLocale;
    setRTL: typeof setRTL;
};
/** Merge extra catalog entries (for progressive localization). */
declare function registerI18nCatalog(locale: string, entries: Dict): void;

interface StreamChunk {
    frames: DataFrame[];
    partial?: boolean;
    error?: Error;
}

type DataSourceListItem = {
    uid: string;
    name: string;
    type: string;
    isDefault?: boolean;
    url?: string;
    access?: string;
    jsonData?: Record<string, unknown>;
    secureJsonFields?: Record<string, boolean>;
};
/**
 * Returns only the configured observability datasource instances.
 * Reads from runtime settings (built-in config file) — no network request.
 */
declare function listDataSources(): Promise<DataSourceListItem[]>;
declare function getDataSourceByUid(uid: string): Promise<DataSourceListItem | null>;
declare function saveDataSource(ds: DataSourceListItem & Record<string, unknown>): Promise<DataSourceListItem>;

/** Datasource error model — pure frontend; never embed secrets in messages. */
type DataSourceErrorCode = "CORS_BLOCKED" | "AUTH" | "AUTH_REQUIRED" | "AUTH_REJECTED" | "FORBIDDEN" | "NOT_FOUND" | "TLS_CLIENT_CERT_UNSUPPORTED" | "UNSUPPORTED_QUERY_API" | "UNSUPPORTED_CAPABILITY" | "UNSUPPORTED_RESPONSE_SHAPE" | "NETWORK_ERROR" | "UPSTREAM_ERROR" | "RATE_LIMITED" | "INVALID_QUERY" | "INVALID_RESPONSE" | "TIMEOUT" | "CANCELLED" | "OFFLINE" | "DATASOURCE_NOT_FOUND" | "DATASOURCE_TYPE_MISMATCH" | "DATASOURCE_AMBIGUOUS" | "DATASOURCE_REQUIRED" | "DIRECT_DB_DATASOURCE_NOT_FOUND" | "UNKNOWN";
interface DataSourceErrorDetails {
    status?: number;
    url?: string;
    endpoint?: string;
    uid?: string;
    refId?: string;
    upstreamCode?: string | number;
    retryAfterMs?: number;
    signal?: string;
    /** Original unresolved ref (stringified, no secrets). */
    ref?: unknown;
    /** Comma-separated loaded UIDs for diagnostics. */
    loaded?: string;
}
declare function sanitizeErrorText(text: string): string;
declare class DataSourceError extends Error {
    readonly code: DataSourceErrorCode;
    readonly details?: DataSourceErrorDetails;
    constructor(code: DataSourceErrorCode, message: string, details?: DataSourceErrorDetails);
    static fromHttpStatus(status: number, _statusText: string, url?: string): DataSourceError;
    static fromNetwork(err: unknown, url?: string): DataSourceError;
}
declare function isDataSourceError(e: unknown): e is DataSourceError;
declare function withDataSourceContext(error: unknown, ctx: {
    uid?: string;
    refId?: string;
    endpoint?: string;
    status?: number;
    upstreamCode?: string | number;
    retryAfterMs?: number;
}): DataSourceError;

interface RuntimeCredential {
    kind: "bearer" | "basic" | "apiKey" | "headers" | "session";
    value?: string;
    username?: string;
    password?: string;
    headers?: Record<string, string>;
    /** header name for apiKey kind, default X-API-Key */
    headerName?: string;
    /** session auth (SigNoz): access token in value, plus rotate/relogin fields */
    refreshToken?: string;
    orgID?: string;
    email?: string;
    rememberPassword?: boolean;
}
type RuntimeCredentialProvider = (uid: string) => RuntimeCredential | null | undefined | Promise<RuntimeCredential | null | undefined>;
/** Host injects credentials in-memory only (lost on reload). */
declare function configureRuntimeCredentials(p: RuntimeCredentialProvider | null): void;
declare function setRuntimeCredential(uid: string, cred: RuntimeCredential | null): void;
declare function getRuntimeCredential(uid: string): Promise<RuntimeCredential | null>;
declare function clearRuntimeCredentials(): void;
/** Apply credential into headers map without logging values. */
declare function applyCredentialHeaders(headers: Record<string, string>, cred: RuntimeCredential | null | undefined): Record<string, string>;

interface DatasourceHttpRequest {
    baseUrl: string;
    path?: string;
    method?: "GET" | "POST" | "PUT" | "DELETE";
    query?: Record<string, string | number | boolean | Array<string | number> | undefined | null>;
    body?: unknown;
    headers?: Record<string, string>;
    signal?: AbortSignal;
    timeoutMs?: number;
    /** datasource uid for credential lookup */
    uid?: string;
    credential?: RuntimeCredential | null;
    credentials?: RequestCredentials;
    /** default 10 MiB per Task 4 policy */
    maxBodyBytes?: number;
    /** explicit network policy — live datasources can force network even if backendSrv is offline */
    forceNetwork?: boolean;
    /** idempotent reads may retry; writes must set isWrite */
    idempotent?: boolean;
    isWrite?: boolean;
    /** max automatic retries for idempotent reads (default 1 for 502/503/429) */
    maxRetries?: number;
}
interface DatasourceHttpResponse<T = unknown> {
    data: T;
    status: number;
    headers: Headers;
    url: string;
}
/** Sanitized request log for Inspect → Query (T5-33 / T5-53). Never stores secrets. */
interface DatasourceHttpLogEntry {
    ts: number;
    uid?: string;
    method: string;
    url: string;
    status?: number;
    durationMs?: number;
    bodyPreview?: string;
    error?: string;
}
declare function getDatasourceHttpLog(uid?: string): DatasourceHttpLogEntry[];
declare function clearDatasourceHttpLog(): void;
declare function datasourceHttp<T = unknown>(req: DatasourceHttpRequest): Promise<DatasourceHttpResponse<T>>;

/**
 * In-memory runtime DataSourceInstanceSettings registry.
 * Public settings only — secrets live in runtimeCredentials.
 */
type DataSourceInstanceSettings = {
    uid: string;
    name: string;
    type: string;
    url?: string;
    access?: string;
    isDefault?: boolean;
    jsonData?: Record<string, unknown>;
    meta?: Record<string, unknown>;
    /** Where this entry was registered from (debug only, not persisted). */
    source?: "runtime" | "backend" | "seed";
};
declare class RuntimeDataSourceSettingsError extends Error {
    readonly code: string;
    constructor(message: string, code: string);
}
declare function clearRuntimeDataSourceSettings(): void;
declare function configureRuntimeDataSourceSettings(settings: DataSourceInstanceSettings[]): void;
declare function listRuntimeDataSourceSettings(): DataSourceInstanceSettings[];
declare function getRuntimeDataSourceSettings(uid: string): DataSourceInstanceSettings | undefined;
/**
 * Merge runtime + backend + seed lists by UID.
 *
 * Field priority: runtime > backend > seed (same UID).
 * Default priority: backend default wins over runtime; seeds never default.
 * Built-in TestData/Mixed seeds only fill missing UIDs and never override remote default/url/id.
 * Multiple defaults *within backend* is a contract error; cross-source defaults are resolved
 * by preferring backend (then a single runtime default).
 */
declare function mergeDataSourceSettings(parts: {
    runtime?: DataSourceInstanceSettings[];
    backend?: DataSourceInstanceSettings[];
    seeds?: DataSourceInstanceSettings[];
}): DataSourceInstanceSettings[];
declare function getEffectiveDefaultDataSource(list?: DataSourceInstanceSettings[]): DataSourceInstanceSettings | undefined;

/**
 * In-session full response store for Inspect / export.
 * Desensitized request + full business response, TTL + byte LRU.
 * Never writes localStorage; never stores credentials.
 */
type InspectorEntry = {
    key: string;
    requestId: string;
    datasourceUid: string;
    savedAt: number;
    expiresAt: number;
    bytes: number;
    request: {
        method?: string;
        url?: string;
        headers?: Record<string, string>;
        body?: unknown;
    };
    response: unknown;
    stats?: Record<string, unknown>;
    warnings?: string[];
    capability?: Record<string, unknown>;
};
declare function configureQueryInspectorStore(opts?: {
    maxBytes?: number;
    ttlMs?: number;
}): void;
declare function clearQueryInspectorStore(): void;
declare function makeInspectorKey(requestId: string, datasourceUid: string): string;
declare function putQueryInspectorEntry(input: {
    requestId: string;
    datasourceUid: string;
    request?: InspectorEntry["request"];
    response: unknown;
    stats?: Record<string, unknown>;
    warnings?: string[];
    capability?: Record<string, unknown>;
    ttlMs?: number;
}): InspectorEntry;
declare function getQueryInspectorEntry(requestId: string, datasourceUid: string): InspectorEntry | undefined;
declare function listQueryInspectorEntries(datasourceUid?: string): InspectorEntry[];
declare function getQueryInspectorStats(): {
    entries: number;
    totalBytes: number;
    maxBytes: number;
    ttlMs: number;
};

/**
 * Isolated Axios instances for runtime HTTP strategies.
 * Never mutates axios.defaults; interceptors are installable/uninstallable.
 */

type HttpClientKind = "backend" | "datasource" | "resource" | "app";
interface CreateHttpClientOptions {
    kind: HttpClientKind;
    timeoutMs?: number;
    baseURL?: string;
    withCredentials?: boolean;
    /** Injected for tests — never share state across tests. */
    adapter?: AxiosAdapter;
}
interface HttpClient {
    readonly kind: HttpClientKind;
    readonly axios: AxiosInstance;
    request<T = unknown>(config: AxiosRequestConfig): Promise<AxiosResponse<T>>;
    dispose(): void;
}
/**
 * Create a dedicated Axios instance.
 * validateStatus always true so callers map status (preserves datasourceHttp behavior).
 */
declare function createHttpClient(opts: CreateHttpClientOptions): HttpClient;
/** Headers-like wrapper so existing Headers.get call sites keep working. */
declare class NormalizedHeaders {
    private map;
    constructor(init?: Record<string, string> | Headers | AxiosResponse["headers"]);
    get(name: string): string | null;
    has(name: string): boolean;
    forEach(cb: (value: string, key: string) => void): void;
    entries(): IterableIterator<[string, string]>;
}
declare function axiosHeadersToRecord(headers: AxiosResponse["headers"]): Record<string, string>;
declare function getBackendHttp(): HttpClient;
declare function getDatasourceHttpClient(): HttpClient;
declare function getResourceHttp(): HttpClient;
declare function getAppHttp(): HttpClient;
/**
 * Test / composition helper — replace datasource singleton (e.g. inject AxiosAdapter).
 * Production code should not need this; prefer getDatasourceHttpClient().
 */
declare function configureDatasourceHttpClient(opts?: {
    adapter?: AxiosAdapter;
    timeoutMs?: number;
}): HttpClient;
/** Test helper — dispose and clear singletons. */
declare function resetHttpClients(): void;

/**
 * DataSourceCatalog — single owner of DataSource instance lifecycle.
 * Callers must not maintain parallel Maps of instances.
 */

type DataSourceRef = string | {
    uid?: string | {
        uid?: string;
        type?: string;
    };
    type?: string;
    name?: string;
} | null | undefined;
interface DataSourceSummary {
    uid: string;
    type: string;
    name: string;
    isDefault?: boolean;
    url?: string;
}
interface DataSourceCatalog {
    configure(input?: DataSourceConfigurationInput): Promise<void>;
    list(): readonly DataSourceSummary[];
    resolve(ref: DataSourceRef): DataSourceApi;
    tryResolve(ref: DataSourceRef): DataSourceApi | undefined;
    getInstances(): ReadonlyMap<string, DataSourceApi>;
    register(ds: DataSourceApi): void;
    dispose(uid?: string): void;
    /** True after at least one successful configure. */
    isReady(): boolean;
    /** Wait until configure has completed at least once (or immediately if ready). */
    whenReady(): Promise<void>;
}
interface DataSourceConfigurationInput {
    /** optional pre-merged settings; when omitted Catalog loads runtime+backend+seeds */
    settings?: DataSourceInstanceSettings$1[];
    /** plugin lookup + factory */
    getDataSourcePlugin: (type: string) => {
        meta?: unknown;
        createDataSource?: (settings: DataSourceInstanceSettings$1) => DataSourcePluginApi;
    } | undefined;
    registerRuntimeDataSource?: (uid: string, ds: DataSourceApi) => void;
    unregisterRuntimeDataSource?: (uid: string) => void;
}
declare function normalizeDataSourceType(type: string | undefined | null): string;
declare function createDataSourceCatalog(): DataSourceCatalog;
declare function getDataSourceCatalog(): DataSourceCatalog;
declare function resetDataSourceCatalog(): void;

/**
 * Grafana backend auth — single source for Authorization Bearer token.
 * Token never logged; missing token fails closed for live Grafana API calls.
 */
type GrafanaAuthSource = "window" | "localStorage" | "env" | "none";
interface GrafanaAuthSnapshot {
    present: boolean;
    source: GrafanaAuthSource;
    /** redacted preview only, e.g. glsa_*** */
    preview: string;
}
/** Resolve token with priority: window > localStorage > env. */
declare function getGrafanaAuthToken(): string | null;
declare function getGrafanaAuthSnapshot(): GrafanaAuthSnapshot;
declare function redactToken(token: string): string;
/** Persist token in-session storage only (never commit). */
declare function setGrafanaAuthToken(token: string | null): void;
declare class GrafanaAuthError extends Error {
    readonly code = "AUTH_TOKEN_MISSING";
    constructor(message?: string);
}
/** Fail closed before live Grafana requests leave the client. */
declare function requireGrafanaAuthToken(): string;
declare function applyGrafanaAuthHeaders(headers?: Record<string, string>): Record<string, string>;
/** True when operator configured a live Grafana target (URL and/or token). */
declare function isGrafanaLiveConfigured(): boolean;
declare function getGrafanaBaseUrl(): string;

export { DataSourceError, GrafanaAuthError, NormalizedHeaders, OFFLINE_STORAGE_KEYS, QueryScheduler, RuntimeDataSourceSettingsError, THEME_STORAGE_KEY, applyCredentialHeaders, applyGrafanaAuthHeaders, axiosHeadersToRecord, backendRequest, backendSrv, clearDatasourceHttpLog, clearQueryInspectorStore, clearRuntimeCredentials, clearRuntimeDataSourceSettings, configureBackendSrv, configureDatasourceHttpClient, configureQueryInspectorStore, configureRuntimeCredentials, configureRuntimeDataSourceSettings, createDataSourceCatalog, createDefaultBootData, createHttpClient, datasourceHttp, getAppHttp, getBackendHttp, getBackendMode, getBootData, getDataSourceByUid, getDataSourceCatalog, getDatasourceHttpClient, getDatasourceHttpLog, getEffectiveDefaultDataSource, getGrafanaAuthSnapshot, getGrafanaAuthToken, getGrafanaBaseUrl, getLiveDashboardBuilders, getQueryInspectorEntry, getQueryInspectorStats, getResourceHttp, getRuntimeCredential, getRuntimeDataSourceSettings, hasPermission, initTheme, isDataSourceError, isFeatureEnabled, isGrafanaLiveConfigured, listDataSources, listQueryInspectorEntries, listRuntimeDataSourceSettings, makeInspectorKey, mergeDataSourceSettings, normalizeDataSourceType, onThemeChange, putQueryInspectorEntry, readUrlTheme, redactToken, registerI18nCatalog, registerLiveDashboardBuilders, requireGrafanaAuthToken, resetDataSourceCatalog, resetHttpClients, resetOfflineStorage, resolveInitialPreference, sanitizeErrorText, saveDataSource, setBootData, setGrafanaAuthToken, setLocale, setRTL, setRuntimeCredential, t, useBootData, useI18n, useLocationService, usePermissions, useTheme, withDataSourceContext };
export type { BackendAdapter, BackendMode, BackendRequestOptions, BackendResponse, BootData, BootUser, CreateHttpClientOptions, DataSourceApi, DataSourceCatalog, DataSourceConfigurationInput, DataSourceErrorCode, DataSourceErrorDetails, DataSourceInstanceSettings, DataSourceListItem, DataSourceRef, DataSourceResolver, DataSourceSummary, DatasourceHttpLogEntry, DatasourceHttpRequest, DatasourceHttpResponse, GrafanaAuthSnapshot, GrafanaAuthSource, HttpClient, HttpClientKind, InspectorEntry, LocationState, QueryRequest, QuerySchedulerOptions, RuntimeCredential, RuntimeCredentialProvider, StreamChunk, ThemeMode, ThemePreference };

// ----- @grafana/ui -----
declare const grafanaCssVars: {
    readonly light: Record<string, string>;
    readonly dark: Record<string, string>;
};
type ThemeMode = "light" | "dark";
type TextDirection = "ltr" | "rtl";
declare function applyThemeVars(mode: ThemeMode, el?: HTMLElement, opts?: {
    direction?: TextDirection;
}): void;
/** Ant Design Vue design tokens aligned with Grafana theme. */
declare function antDesignThemeTokens(mode: ThemeMode): {
    colorPrimary: string;
    colorSuccess: string;
    colorWarning: string;
    colorError: string;
    colorInfo: string;
    colorText: string;
    colorTextSecondary: string;
    colorTextTertiary: string;
    colorTextDisabled: string;
    colorBgBase: string;
    colorBgContainer: string;
    colorBgElevated: string;
    colorBgLayout: string;
    colorBgSpotlight: string;
    colorBorder: string;
    colorBorderSecondary: string;
    colorFillSecondary: string;
    colorFillTertiary: string;
    colorFillQuaternary: string;
    colorBgTextHover: string;
    controlItemBgHover: string;
    controlItemBgActive: string;
    borderRadius: number;
    borderRadiusLG: number;
    borderRadiusSM: number;
    fontFamily: string;
    fontSize: number;
    colorLink: string;
    controlHeight: number;
    controlOutline: string;
    colorPrimaryBorderHover: string;
    colorBgContainerDisabled: string;
    boxShadow: string;
    boxShadowSecondary: string;
};
declare function applyTextDirection(direction: TextDirection, el?: HTMLElement): void;
declare function detectTextDirection(locale?: string): TextDirection;

/**
 * Grafana SVG icon registry (Task 4.2).
 * Strict mode fails on unknown icon names — never silent '?'.
 */
type IconSize = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
interface IconDefinition {
    name: string;
    /** Inline SVG path(s) inner HTML or full svg markup body */
    body?: string;
    viewBox?: string;
    /** Raw svg file contents when available */
    svg?: string;
}
declare function registerIcon(def: IconDefinition): void;
declare function resolveIconName(name: string): string;
declare function getIcon(name: string, { strict }?: {
    strict?: boolean | undefined;
}): IconDefinition | undefined;
declare function listIconNames(): string[];

/**
 * Legacy entry — prefer icons/registry.
 * Ant Design mapping is deprecated for parity surfaces.
 */

/** @deprecated use GIcon + registry */
declare function resolveIcon(_name: string): undefined;
/** @deprecated empty for parity surfaces */
declare const iconMap: Record<string, never>;

type __VLS_Props$F = {
    variant?: "primary" | "secondary" | "destructive" | "text";
    size?: "sm" | "md" | "lg";
    disabled?: boolean;
    loading?: boolean;
    htmlType?: "button" | "submit" | "reset";
    testId?: string;
};
declare var __VLS_8$1: {};
type __VLS_Slots$g = {} & {
    default?: (props: typeof __VLS_8$1) => any;
};
declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$F, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$F> & Readonly<{}>, {
    variant: "primary" | "secondary" | "destructive" | "text";
    size: "sm" | "md" | "lg";
    htmlType: "button" | "submit" | "reset";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$H: __VLS_WithSlots$g<typeof __VLS_base$g, __VLS_Slots$g>;
declare const _default$H: typeof __VLS_export$H;

type __VLS_WithSlots$g<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$E = {
    open: boolean;
    title?: string;
    width?: number | string;
    confirmLoading?: boolean;
    okText?: string;
    cancelText?: string;
    testId?: string;
};
declare var __VLS_12$1: {};
type __VLS_Slots$f = {} & {
    default?: (props: typeof __VLS_12$1) => any;
};
declare const __VLS_base$f: vue.DefineComponent<__VLS_Props$E, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
    ok: () => any;
    cancel: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$E> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
    onOk?: (() => any) | undefined;
    onCancel?: (() => any) | undefined;
}>, {
    width: number | string;
    okText: string;
    cancelText: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$G: __VLS_WithSlots$f<typeof __VLS_base$f, __VLS_Slots$f>;
declare const _default$G: typeof __VLS_export$G;

type __VLS_WithSlots$f<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type GSelectOption = {
    label: string;
    value?: string | number;
    disabled?: boolean;
    options?: GSelectOption[];
};
type __VLS_Props$D = {
    value?: string | number | Array<string | number> | null;
    options?: GSelectOption[];
    placeholder?: string;
    disabled?: boolean;
    allowClear?: boolean;
    mode?: "multiple" | "tags";
    testId?: string;
    ariaLabel?: string;
    showSearch?: boolean;
    size?: "small" | "middle" | "large";
    /** Custom filter (label + value). When omitted, ant filters by option-filter-prop. */
    filterOption?: boolean | ((input: string, option: any) => boolean);
    /** Disable virtual list when options must all be clickable without scroll (e.g. viz picker). */
    virtual?: boolean;
};
declare const __VLS_export$F: vue.DefineComponent<__VLS_Props$D, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (args_0: unknown) => any;
    "update:value": (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$D> & Readonly<{
    onChange?: ((args_0: unknown) => any) | undefined;
    "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
}>, {
    size: "small" | "middle" | "large";
    showSearch: boolean;
    virtual: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$F: typeof __VLS_export$F;

type __VLS_Props$C = {
    layout?: "horizontal" | "vertical" | "inline";
    model?: Record<string, unknown>;
    testId?: string;
};
declare var __VLS_11$2: {};
type __VLS_Slots$e = {} & {
    default?: (props: typeof __VLS_11$2) => any;
};
declare const __VLS_base$e: vue.DefineComponent<__VLS_Props$C, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    finish: (args_0: Record<string, unknown>) => any;
    finishFailed: (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$C> & Readonly<{
    onFinish?: ((args_0: Record<string, unknown>) => any) | undefined;
    onFinishFailed?: ((args_0: unknown) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$E: __VLS_WithSlots$e<typeof __VLS_base$e, __VLS_Slots$e>;
declare const _default$E: typeof __VLS_export$E;

type __VLS_WithSlots$e<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$B = {
    name: string;
    size?: number | string;
    color?: string;
    title?: string;
    spin?: boolean;
    strict?: boolean;
};
declare const __VLS_export$D: vue.DefineComponent<__VLS_Props$B, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$B> & Readonly<{}>, {
    strict: boolean;
    size: number | string;
    spin: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$D: typeof __VLS_export$D;

type __VLS_Props$A = {
    value?: string | number;
    modelValue?: string | number;
    placeholder?: string;
    type?: "text" | "number" | "password" | "email" | "url" | "search" | "time" | "date";
    disabled?: boolean;
    testId?: string;
};
declare const __VLS_export$C: vue.DefineComponent<__VLS_Props$A, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:value": (args_0: string | number) => any;
    focus: (args_0: FocusEvent) => any;
    "update:modelValue": (args_0: string | number) => any;
    blur: (args_0: FocusEvent) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$A> & Readonly<{
    "onUpdate:value"?: ((args_0: string | number) => any) | undefined;
    onFocus?: ((args_0: FocusEvent) => any) | undefined;
    "onUpdate:modelValue"?: ((args_0: string | number) => any) | undefined;
    onBlur?: ((args_0: FocusEvent) => any) | undefined;
}>, {
    type: "text" | "number" | "password" | "email" | "url" | "search" | "time" | "date";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$C: typeof __VLS_export$C;

type __VLS_Props$z = {
    checked?: boolean;
    disabled?: boolean;
    testId?: string;
};
declare const __VLS_export$B: vue.DefineComponent<__VLS_Props$z, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:checked": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$z> & Readonly<{
    "onUpdate:checked"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$B: typeof __VLS_export$B;

type __VLS_Props$y = {
    checked?: boolean;
    disabled?: boolean;
    testId?: string;
};
declare var __VLS_10$1: {};
type __VLS_Slots$d = {} & {
    default?: (props: typeof __VLS_10$1) => any;
};
declare const __VLS_base$d: vue.DefineComponent<__VLS_Props$y, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:checked": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$y> & Readonly<{
    "onUpdate:checked"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$A: __VLS_WithSlots$d<typeof __VLS_base$d, __VLS_Slots$d>;
declare const _default$A: typeof __VLS_export$A;

type __VLS_WithSlots$d<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$x = {
    activeKey?: string;
    items: Array<{
        key: string;
        label: string;
    }>;
    testId?: string;
};
declare var __VLS_17: string;
declare var __VLS_18: {};
type __VLS_Slots$c = {} & {
    [K in NonNullable<typeof __VLS_17>]?: (props: typeof __VLS_18) => any;
};
declare const __VLS_base$c: vue.DefineComponent<__VLS_Props$x, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:activeKey": (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$x> & Readonly<{
    "onUpdate:activeKey"?: ((args_0: string) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$z: __VLS_WithSlots$c<typeof __VLS_base$c, __VLS_Slots$c>;
declare const _default$z: typeof __VLS_export$z;

type __VLS_WithSlots$c<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$w = {
    open?: boolean;
    title?: string;
    width?: number | string;
    testId?: string;
};
declare var __VLS_10: {};
type __VLS_Slots$b = {} & {
    default?: (props: typeof __VLS_10) => any;
};
declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$w, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$w> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$y: __VLS_WithSlots$b<typeof __VLS_base$b, __VLS_Slots$b>;
declare const _default$y: typeof __VLS_export$y;

type __VLS_WithSlots$b<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$v = {
    title?: string;
};
declare var __VLS_8: {};
type __VLS_Slots$a = {} & {
    default?: (props: typeof __VLS_8) => any;
};
declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$v, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$v> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$x: __VLS_WithSlots$a<typeof __VLS_base$a, __VLS_Slots$a>;
declare const _default$x: typeof __VLS_export$x;

type __VLS_WithSlots$a<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$u = {
    columns: Array<Record<string, unknown>>;
    dataSource: Array<Record<string, unknown>>;
    loading?: boolean;
    testId?: string;
    pagination?: boolean | Record<string, unknown>;
};
declare const __VLS_export$w: vue.DefineComponent<__VLS_Props$u, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$u> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$w: typeof __VLS_export$w;

type __VLS_Props$t = {
    value?: string;
    language?: string;
    height?: string | number;
    readOnly?: boolean;
    testId?: string;
};
declare const __VLS_export$v: vue.DefineComponent<__VLS_Props$t, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (args_0: string) => any;
    "update:value": (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$t> & Readonly<{
    onChange?: ((args_0: string) => any) | undefined;
    "onUpdate:value"?: ((args_0: string) => any) | undefined;
}>, {
    value: string;
    height: string | number;
    language: string;
    readOnly: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$v: typeof __VLS_export$v;

type __VLS_Props$s = {
    modelValue?: string | null;
    clearable?: boolean;
};
declare const __VLS_export$u: vue.DefineComponent<__VLS_Props$s, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$s> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$u: typeof __VLS_export$u;

type __VLS_Props$r = {
    modelValue?: string | {
        mode?: string;
        fixedColor?: string;
    } | null;
    /** When true treat as fieldColor object; default simple hex/string */
    fieldMode?: boolean;
};
declare const __VLS_export$t: vue.DefineComponent<__VLS_Props$r, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$r> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: unknown) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$t: typeof __VLS_export$t;

type FieldColor = {
    mode?: string;
    fixedColor?: string;
    seriesBy?: "min" | "max" | "last";
    gradientColorTo?: string;
};
type __VLS_Props$q = {
    modelValue?: FieldColor | string | null;
    byValueSupport?: boolean;
};
declare const __VLS_export$s: vue.DefineComponent<__VLS_Props$q, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: FieldColor) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$q> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: FieldColor) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$s: typeof __VLS_export$s;

interface ThresholdStep {
    value: number;
    color: string;
}
interface ThresholdsConfig {
    mode: "absolute" | "percentage";
    steps: ThresholdStep[];
}
type __VLS_Props$p = {
    modelValue?: ThresholdsConfig | null;
};
declare const __VLS_export$r: vue.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: ThresholdsConfig) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: ThresholdsConfig) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$r: typeof __VLS_export$r;

type ValueMapping = {
    type: "value";
    options: Record<string, {
        text: string;
        color?: string;
    }>;
} | {
    type: "range";
    options: Array<{
        from: number;
        to: number;
        result: {
            text: string;
            color?: string;
        };
    }>;
} | {
    type: "regex";
    options: Array<{
        pattern: string;
        result: {
            text: string;
            color?: string;
        };
    }>;
} | {
    type: "special";
    options: Array<{
        match: string;
        result: {
            text: string;
            color?: string;
        };
    }>;
};
type __VLS_Props$o = {
    modelValue?: ValueMapping[] | null;
};
declare const __VLS_export$q: vue.DefineComponent<__VLS_Props$o, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: ValueMapping[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: ValueMapping[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$q: typeof __VLS_export$q;

interface DataLink {
    title?: string;
    url?: string;
    targetBlank?: boolean;
}
type __VLS_Props$n = {
    modelValue?: DataLink[] | null;
    dataFrames?: DataFrame[];
    templateVars?: string[];
    /** Grafana getVariableValueProperties paths keyed by var name */
    templateVarProperties?: Record<string, string[]>;
};
declare const __VLS_export$p: vue.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: DataLink[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: DataLink[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$p: typeof __VLS_export$p;

type FieldNameOption = {
    label: string;
    value: string;
    type?: string;
    rawName?: string;
    /** Origin frame name / refId for multi-frame filtering */
    frameName?: string;
    refId?: string;
};

type __VLS_Props$m = {
    modelValue?: string | null;
    /** Flat list of names (legacy) */
    fieldNames?: string[];
    /** Rich options from frames */
    options?: FieldNameOption[];
    /** When set with options that have type, filter by these field types */
    filterTypes?: string[];
    /** Optional predicate (Grafana settings.filter) */
    filterFn?: (opt: FieldNameOption) => boolean;
    /** Limit options to these frame names / refIds (multi-frame filter) */
    frameNames?: string[];
    placeholder?: string;
    /** Grafana FieldNamePickerConfigSettings.noFieldsMessage */
    noFieldsMessage?: string;
    /**
     * Grafana FieldNamePickerBaseNameMode:
     * - default: all display names
     * - only: bare field names (exclude "Name {labels…}" style)
     * - exclude: only labeled / overridden display names
     */
    baseNameMode?: "exclude" | "only" | "default" | string;
    /** Grafana MatcherScope filter (series/nested/annotation/exemplar) */
    scope?: MatcherScope | string;
    width?: number | string;
    allowClear?: boolean;
    includeAuto?: boolean;
};
declare const __VLS_export$o: vue.DefineComponent<__VLS_Props$m, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
}>, {
    placeholder: string;
    allowClear: boolean;
    noFieldsMessage: string;
    baseNameMode: "exclude" | "only" | "default" | string;
    includeAuto: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$o: typeof __VLS_export$o;

type __VLS_Props$l = {
    modelValue?: string | string[] | null;
    allowMultiple?: boolean;
};
declare const __VLS_export$n: vue.DefineComponent<__VLS_Props$l, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: string[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: string[]) => any) | undefined;
}>, {
    allowMultiple: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$n: typeof __VLS_export$n;

type __VLS_Props$k = {
    modelValue?: string[] | null;
};
declare const __VLS_export$m: vue.DefineComponent<__VLS_Props$k, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: string[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: string[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$m: typeof __VLS_export$m;

type __VLS_Props$j = {
    modelValue?: string | null;
};
declare const __VLS_export$l: vue.DefineComponent<__VLS_Props$j, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$l: typeof __VLS_export$l;

interface ActionItem {
    type?: string;
    title?: string;
    options?: {
        url?: string;
    };
}
type __VLS_Props$i = {
    modelValue?: ActionItem[] | null;
};
declare const __VLS_export$k: vue.DefineComponent<__VLS_Props$i, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: ActionItem[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: ActionItem[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$k: typeof __VLS_export$k;

/** Auto-generated from grafana-main valueFormats/categories.ts — unit catalog for UnitPicker */
interface UnitOption {
    label: string;
    value: string;
}
interface UnitCategory {
    name: string;
    formats: UnitOption[];
}
declare const UNIT_CATEGORIES: UnitCategory[];
declare function flattenUnits(): UnitOption[];

type __VLS_Props$h = {
    width: number;
    height: number;
    legendPlacement?: "bottom" | "right";
    legendMaxHeight?: string;
    legendMaxWidth?: string;
    legendWidth?: number | string;
};
declare var __VLS_1$6: {
    width: number;
    height: number;
};
declare var __VLS_3$1: {};
type __VLS_Slots$9 = {} & {
    default?: (props: typeof __VLS_1$6) => any;
} & {
    legend?: (props: typeof __VLS_3$1) => any;
};
declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {
    legendPlacement: "bottom" | "right";
    legendMaxHeight: string;
    legendMaxWidth: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$j: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
declare const _default$j: typeof __VLS_export$j;

type __VLS_WithSlots$9<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type EventHandler = (payload?: unknown) => void;
interface EventBus {
    publish(event: string, payload?: unknown): void;
    subscribe(event: string, handler: EventHandler): () => void;
}
declare function createEventBus(): EventBus;

type SeriesVisibilityChangeMode = "appendToSelection" | "toggleSelection" | "replaceSelection";
interface PanelContext {
    eventsScope: string;
    eventBus: EventBus;
    app?: string;
    sync?: () => number;
    onSeriesColorChange?: (label: string, color: string) => void;
    onToggleSeriesVisibility?: (label: string | string[] | null, mode: SeriesVisibilityChangeMode) => void;
    onToggleLegendSort?: (sortBy: string) => void;
    onOpenInspector?: () => void;
    instanceState?: unknown;
    onInstanceStateChange?: (state: unknown) => void;
    canExecuteActions?: () => boolean;
}
declare const panelContextKey: InjectionKey<PanelContext>;
declare function createDefaultPanelContext(partial?: Partial<PanelContext>): PanelContext;
declare function providePanelContext(ctx: PanelContext): void;
declare function usePanelContext(): PanelContext;

type __VLS_Props$g = {
    value?: Partial<PanelContext>;
};
declare var __VLS_1$5: {};
type __VLS_Slots$8 = {} & {
    default?: (props: typeof __VLS_1$5) => any;
};
declare const __VLS_base$8: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$i: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
declare const _default$i: typeof __VLS_export$i;

type __VLS_WithSlots$8<T, S> = T & {
    new (): {
        $slots: S;
    };
};

declare enum BigValueColorMode {
    Background = "background",
    BackgroundSolid = "background_solid",
    None = "none",
    Value = "value"
}
declare enum BigValueGraphMode {
    None = "none",
    Line = "line",
    Area = "area"
}
declare enum BigValueJustifyMode {
    Auto = "auto",
    Center = "center"
}
declare enum BigValueTextMode {
    Auto = "auto",
    Value = "value",
    ValueAndName = "value_and_name",
    Name = "name",
    None = "none"
}
type PercentChangeColorMode = "standard" | "inverted" | "same_as_value";
interface BigValueDisplayValue {
    text: string;
    title?: string;
    color?: string;
    numeric?: number;
    percentChange?: number | null;
}
interface BigValueTextSizes {
    titleSize?: number;
    valueSize?: number;
    percentSize?: number;
}
interface BigValueProps {
    width: number;
    height: number;
    value: BigValueDisplayValue;
    sparkline?: number[];
    colorMode?: BigValueColorMode | string;
    graphMode?: BigValueGraphMode | string;
    justifyMode?: BigValueJustifyMode | string;
    textMode?: BigValueTextMode | string;
    text?: BigValueTextSizes;
    count?: number;
    disableWideLayout?: boolean;
    percentChangeColorMode?: PercentChangeColorMode | string;
    wideLayout?: boolean;
}

declare const __VLS_export$h: vue.DefineComponent<BigValueProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<BigValueProps> & Readonly<{}>, {
    width: number;
    height: number;
    colorMode: BigValueColorMode | string;
    graphMode: BigValueGraphMode | string;
    wideLayout: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$h: typeof __VLS_export$h;

declare function estimateTextWidth(text: string, fontSize: number, weight?: number): number;
/**
 * Mirrors Grafana calculateFontSize (packages/grafana-ui/src/utils/measureText.ts).
 */
declare function calculateFontSize(text: string, width: number, height: number, lineHeight?: number, maxSize?: number, weight?: number): number;
interface BigValueLayoutResult {
    titleFontSize: number;
    valueFontSize: number;
    percentFontSize: number;
    chartHeight: number;
    chartWidth: number;
    valueColor: string;
    panelPadding: number;
    justifyCenter: boolean;
    maxTextWidth: number;
    maxTextHeight: number;
    title?: string;
    valueText: string;
    percentText?: string;
    isWide: boolean;
    valueColorCss: string;
    titleColorCss: string;
    containerBackground?: string;
    containerColor?: string;
}
declare function computeBigValueLayout(props: BigValueProps): BigValueLayoutResult;
declare function toDisplayValue(item: {
    text: string;
    name?: string;
    color?: string;
    percentChange?: number | null;
}): BigValueDisplayValue;

type VizLegendItem = {
    label: string;
    color?: string;
    yAxis?: number;
    disabled?: boolean;
    getItemKey?: () => string;
    fieldName?: string;
};
type VizLegendPlacement = "bottom" | "right";
type VizLegendDisplayMode = "list" | "table" | "hidden";

type __VLS_Props$f = {
    items: VizLegendItem[];
    placement?: VizLegendPlacement;
    displayMode?: VizLegendDisplayMode;
    readonly?: boolean;
};
declare const __VLS_export$g: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "label-click": (item: VizLegendItem, event: MouseEvent) => any;
    "label-mouseover": (item: VizLegendItem, event: MouseEvent) => any;
    "label-mouseout": (item: VizLegendItem, event: MouseEvent) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{
    "onLabel-click"?: ((item: VizLegendItem, event: MouseEvent) => any) | undefined;
    "onLabel-mouseover"?: ((item: VizLegendItem, event: MouseEvent) => any) | undefined;
    "onLabel-mouseout"?: ((item: VizLegendItem, event: MouseEvent) => any) | undefined;
}>, {
    placement: VizLegendPlacement;
    readonly: boolean;
    displayMode: VizLegendDisplayMode;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$g: typeof __VLS_export$g;

type VizTooltipMode = "single" | "multi" | "none";
type VizTooltipItem = {
    label: string;
    value: string;
    color?: string;
    isActive?: boolean;
};

type __VLS_Props$e = {
    title?: string;
    items?: VizTooltipItem[];
    mode?: VizTooltipMode;
    x?: number;
    y?: number;
    visible?: boolean;
    /** When false, host owns position (uplotTooltipPosition wrapper). */
    floating?: boolean;
    maxWidth?: number | string;
    maxHeight?: number | string;
};
declare const __VLS_export$f: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{}>, {
    y: number;
    mode: VizTooltipMode;
    x: number;
    items: VizTooltipItem[];
    visible: boolean;
    floating: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$f: typeof __VLS_export$f;

interface RadioOption {
    label: string;
    value: string | number | boolean;
    disabled?: boolean;
}
type __VLS_Props$d = {
    options: RadioOption[];
    value?: string | number | boolean;
    disabled?: boolean;
    size?: "small" | "middle" | "large";
};
declare const __VLS_export$e: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:value": (v: string | number | boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{
    "onUpdate:value"?: ((v: string | number | boolean) => any) | undefined;
}>, {
    options: RadioOption[];
    size: "small" | "middle" | "large";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$e: typeof __VLS_export$e;

type __VLS_Props$c = {
    label?: string;
    labelWidth?: number;
    tooltip?: string;
    grow?: boolean;
    disabled?: boolean;
    required?: boolean;
};
declare var __VLS_1$4: {};
type __VLS_Slots$7 = {} & {
    default?: (props: typeof __VLS_1$4) => any;
};
declare const __VLS_base$7: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{}>, {
    labelWidth: number;
    grow: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$d: __VLS_WithSlots$7<typeof __VLS_base$7, __VLS_Slots$7>;
declare const _default$d: typeof __VLS_export$d;

type __VLS_WithSlots$7<T, S> = T & {
    new (): {
        $slots: S;
    };
};

declare var __VLS_1$3: {};
type __VLS_Slots$6 = {} & {
    default?: (props: typeof __VLS_1$3) => any;
};
declare const __VLS_base$6: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
declare const __VLS_export$c: __VLS_WithSlots$6<typeof __VLS_base$6, __VLS_Slots$6>;
declare const _default$c: typeof __VLS_export$c;

type __VLS_WithSlots$6<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$b = {
    text?: string;
    color?: "default" | "primary" | "success" | "warning" | "error" | "info";
    icon?: string;
};
declare var __VLS_1$2: {};
type __VLS_Slots$5 = {} & {
    default?: (props: typeof __VLS_1$2) => any;
};
declare const __VLS_base$5: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{}>, {
    color: "default" | "primary" | "success" | "warning" | "error" | "info";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$b: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
declare const _default$b: typeof __VLS_export$b;

type __VLS_WithSlots$5<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$a = {
    name: string;
    color?: string;
    closable?: boolean;
};
declare const __VLS_export$a: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    remove: () => any;
    click: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
    onRemove?: (() => any) | undefined;
    onClick?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$a: typeof __VLS_export$a;

type __VLS_Props$9 = {
    title?: string;
    severity?: "info" | "success" | "warning" | "error";
    closable?: boolean;
};
declare var __VLS_1$1: {};
type __VLS_Slots$4 = {} & {
    default?: (props: typeof __VLS_1$1) => any;
};
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    close: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{
    onClose?: (() => any) | undefined;
}>, {
    closable: boolean;
    severity: "info" | "success" | "warning" | "error";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$9: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
declare const _default$9: typeof __VLS_export$9;

type __VLS_WithSlots$4<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$8 = {
    title?: string;
    href?: string;
    disabled?: boolean;
};
declare var __VLS_1: {};
declare var __VLS_3: {};
declare var __VLS_5: {};
type __VLS_Slots$3 = {} & {
    heading?: (props: typeof __VLS_1) => any;
} & {
    default?: (props: typeof __VLS_3) => any;
} & {
    actions?: (props: typeof __VLS_5) => any;
};
declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$8: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
declare const _default$8: typeof __VLS_export$8;

type __VLS_WithSlots$3<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$7 = {
    open: boolean;
    title?: string;
    body?: string;
    confirmText?: string;
    cancelText?: string;
    danger?: boolean;
};
declare var __VLS_12: {};
type __VLS_Slots$2 = {} & {
    default?: (props: typeof __VLS_12) => any;
};
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (v: boolean) => any;
    cancel: () => any;
    confirm: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{
    "onUpdate:open"?: ((v: boolean) => any) | undefined;
    onCancel?: (() => any) | undefined;
    onConfirm?: (() => any) | undefined;
}>, {
    title: string;
    danger: boolean;
    cancelText: string;
    confirmText: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$7: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
declare const _default$7: typeof __VLS_export$7;

type __VLS_WithSlots$2<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$6 = {
    size?: number;
    tip?: string;
};
declare const __VLS_export$6: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{}>, {
    size: number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$6: typeof __VLS_export$6;

type __VLS_Props$5 = {
    text?: string;
};
declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{}>, {
    text: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$5: typeof __VLS_export$5;

type __VLS_Props$4 = {
    current?: number;
    pageSize?: number;
    total?: number;
    showSizeChanger?: boolean;
};
declare const __VLS_export$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (page: number, pageSize: number) => any;
    "update:current": (n: number) => any;
    "update:pageSize": (n: number) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
    onChange?: ((page: number, pageSize: number) => any) | undefined;
    "onUpdate:current"?: ((n: number) => any) | undefined;
    "onUpdate:pageSize"?: ((n: number) => any) | undefined;
}>, {
    current: number;
    pageSize: number;
    total: number;
    showSizeChanger: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$4: typeof __VLS_export$4;

type __VLS_Props$3 = {
    label?: string;
    value?: string | number;
    placeholder?: string;
    disabled?: boolean;
};
declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (args_0: string | number) => any;
    "update:value": (args_0: string | number) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
    onChange?: ((args_0: string | number) => any) | undefined;
    "onUpdate:value"?: ((args_0: string | number) => any) | undefined;
}>, {
    label: string;
    placeholder: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$3: typeof __VLS_export$3;

type __VLS_Props$2 = {
    title?: string;
    content?: string;
    placement?: "top" | "bottom" | "left" | "right";
};
declare var __VLS_9: {};
declare var __VLS_11$1: {};
type __VLS_Slots$1 = {} & {
    content?: (props: typeof __VLS_9) => any;
} & {
    default?: (props: typeof __VLS_11$1) => any;
};
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{}>, {
    placement: "top" | "bottom" | "left" | "right";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$2: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
declare const _default$2: typeof __VLS_export$2;

type __VLS_WithSlots$1<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props$1 = {
    title?: string;
    content?: string;
    open?: boolean;
    placement?: "top" | "bottom" | "left" | "right";
    trigger?: "hover" | "click" | "focus";
};
declare var __VLS_11: {};
declare var __VLS_13: {};
type __VLS_Slots = {} & {
    content?: (props: typeof __VLS_11) => any;
} & {
    default?: (props: typeof __VLS_13) => any;
};
declare const __VLS_base: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {
    placement: "top" | "bottom" | "left" | "right";
    trigger: "hover" | "click" | "focus";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$1: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default$1: typeof __VLS_export$1;

type __VLS_WithSlots<T, S> = T & {
    new (): {
        $slots: S;
    };
};

type __VLS_Props = {
    value?: string;
    placeholder?: string;
    allowRelative?: boolean;
    disabled?: boolean;
};
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (args_0: string) => any;
    "update:value": (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
    onChange?: ((args_0: string) => any) | undefined;
    "onUpdate:value"?: ((args_0: string) => any) | undefined;
}>, {
    placeholder: string;
    allowRelative: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;

export { _default$k as ActionsEditor, _default$h as BigValue, BigValueColorMode, BigValueGraphMode, BigValueJustifyMode, BigValueTextMode, _default$t as ColorPicker, _default$p as DataLinksEditor, _default$s as FieldColorEditor, _default$o as FieldNamePicker, _default$9 as GAlert, _default$b as GBadge, _default$H as GButton, _default$8 as GCard, _default$A as GCheckbox, _default$v as GCodeEditor, _default$7 as GConfirmModal, _default as GDatePicker, _default$y as GDrawer, _default$E as GForm, _default$D as GIcon, _default$d as GInlineField, _default$c as GInlineFieldRow, _default$C as GInput, _default$5 as GLoadingPlaceholder, _default$G as GModal, _default$4 as GPagination, _default$1 as GPopover, _default$e as GRadioButtonGroup, _default$3 as GSegmentInput, _default$F as GSelect, _default$6 as GSpinner, _default$B as GSwitch, _default$w as GTable, _default$z as GTabs, _default$a as GTag, _default$2 as GToggletip, _default$x as GTooltip, _default$i as PanelContextProvider, _default$n as StatsPicker, _default$m as StringArrayEditor, _default$r as ThresholdsEditor, _default$l as TimezonePicker, UNIT_CATEGORIES, _default$u as UnitPicker, _default$q as ValueMappingsEditor, _default$j as VizLayout, _default$g as VizLegend, _default$f as VizTooltip, antDesignThemeTokens, applyTextDirection, applyThemeVars, calculateFontSize, computeBigValueLayout, createDefaultPanelContext, createEventBus, detectTextDirection, estimateTextWidth, flattenUnits, getIcon, grafanaCssVars, iconMap, listIconNames, panelContextKey, providePanelContext, registerIcon, resolveIcon, resolveIconName, toDisplayValue, usePanelContext };
export type { BigValueDisplayValue, BigValueLayoutResult, BigValueProps, BigValueTextSizes, EventBus, EventHandler, FieldNameOption, IconDefinition, IconSize, PanelContext, PercentChangeColorMode, SeriesVisibilityChangeMode, TextDirection, ThemeMode, VizLegendDisplayMode, VizLegendItem, VizLegendPlacement, VizTooltipItem, VizTooltipMode };

// ----- @grafana/panels -----
/** Panel plugin IDs — pure list, no registration side effects. */
declare const PANEL_IDS: readonly ["alexanderzobnin-zabbix-triggers-panel", "signoz-issues", "text", "news", "dashlist", "annolist", "gettingstarted", "welcome", "stat", "gauge", "bargauge", "table", "logs", "logstable", "histogram", "timeseries", "barchart", "piechart", "candlestick", "trend", "state-timeline", "status-history", "heatmap", "geomap", "nodeGraph", "xychart", "canvas", "traces", "flamegraph", "live", "debug", "alertlist", "clock", "statusmap", "polystat", "button", "dynamictext", "gantt", "sankey", "radar", "funnel", "wordcloud", "treemap", "hourly-heatmap"];
type BuiltinPanelId = (typeof PANEL_IDS)[number];

/** Migrate legacy panel options/fieldConfig for known types + plugin full-panel handlers. */
declare function migratePanelModel(panel: PanelModel): PanelModel;
declare function migrateDashboardPanels(panels?: PanelModel[]): PanelModel[];

/**
 * Typed panel chrome actions — single channel from PanelHost/Chrome to page hosts.
 * Set matches existing production emit surface (do not drop actions).
 */
type PanelAction = {
    type: "edit";
    panelId: number | string;
} | {
    type: "view";
    panelId: number | string;
} | {
    type: "inspect";
    panelId: number | string;
    tab?: string;
} | {
    type: "duplicate";
    panelId: number | string;
} | {
    type: "remove";
    panelId: number | string;
} | {
    type: "share";
    panelId: number | string;
    mode?: "link" | "embed" | "snapshot" | string;
} | {
    type: "explore";
    panelId: number | string;
} | {
    type: "copy";
    panelId: number | string;
} | {
    type: "fullscreen";
    panelId: number | string;
} | {
    type: "toggle-legend";
    panelId: number | string;
} | {
    type: "help";
    panelId: number | string;
} | {
    type: "copy-styles";
    panelId: number | string;
} | {
    type: "paste-styles";
    panelId: number | string;
} | {
    type: "time-settings";
    panelId: number | string;
} | {
    type: "library-panel";
    panelId: number | string;
} | {
    type: "unlink-library";
    panelId: number | string;
} | {
    type: "alert-rule";
    panelId: number | string;
} | {
    type: "data-link";
    panelId: number | string;
    href: string;
};

/** When provided by PanelHost, nested panel PanelChrome must not draw a second frame. */
interface PanelHostContext {
    ownedChrome: true;
}
declare const panelHostKey: InjectionKey<PanelHostContext>;

export { PANEL_IDS, migrateDashboardPanels, migratePanelModel, panelHostKey };
export type { BuiltinPanelId, PanelAction };

// ----- @grafana/datasources -----
/** DataSource plugin IDs — pure list, no registration side effects. */
declare const DATASOURCE_IDS: readonly ["dashboard", "mixed", "grafana", "grafana-testdata-datasource", "grafana-postgresql-datasource", "mysql", "mssql", "influxdb", "graphite", "prometheus", "loki", "jaeger", "tempo", "grafana-pyroscope-datasource", "cloudwatch", "grafana-azure-monitor-datasource", "alertmanager", "opentelemetry", "alexanderzobnin-zabbix-datasource", "signoz"];
type BuiltinDataSourceId = (typeof DATASOURCE_IDS)[number];

/**
 * Side-effect-free builtin datasource catalog.
 * Importing this module must not register heavy plugins.
 */

type BuiltinDatasourceCategory = "core" | "metrics" | "logs" | "traces" | "cloud" | "sql" | "observability";
interface BuiltinDatasourceCatalogEntry {
    id: BuiltinDataSourceId;
    name: string;
    category: BuiltinDatasourceCategory;
    capabilities: DataSourceCapabilities;
    icon: string;
    lazy?: () => Promise<void>;
}
declare function listBuiltinDatasourceCatalog(): BuiltinDatasourceCatalogEntry[];
declare function getBuiltinDatasourceCatalogEntry(id: string): BuiltinDatasourceCatalogEntry | undefined;
/** Register heavy (or deferred) catalog entry if needed. Core ids no-op when already registered. */
declare function ensureDatasourceCatalogEntryRegistered(id: string): Promise<void>;
/**
 * True when the full internal catalog definition covers every DATASOURCE_IDS
 * entry exactly once. Uses the complete CATALOG (not the UI-visible subset).
 */
declare function catalogCoversDatasourceIds(): boolean;

type PromqlDiagnosticSeverity = "error" | "warning";
interface PromqlRange {
    from: number;
    to: number;
}
interface PromqlDiagnostic {
    severity: PromqlDiagnosticSeverity;
    message: string;
    range?: PromqlRange;
}
type PromqlAstParseResult = {
    ok: true;
    ast: Tree;
    diagnostics: PromqlDiagnostic[];
} | {
    ok: false;
    ast: Tree;
    diagnostics: PromqlDiagnostic[];
};
/** Replace dashboard macros with same-length durations so lezer can parse. */
declare function sanitizePromqlForLezer(expr: string): string;
declare function parsePromqlToAst(expr: string): PromqlAstParseResult;
declare function isValidPromql(expr: string): boolean;

declare function createBuiltinDataSourceApi(instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta): {
    uid: string;
    type: string;
    name: string;
    capabilities: {
        signals: any;
        query: boolean;
        health: boolean;
        metadata: boolean;
        variables: boolean;
        annotations: boolean;
        exemplars: boolean;
        streaming: boolean;
        queryLanguages: never[];
    };
    query(request: {
        requestId: string;
        targets: DataQuery[];
        range: TimeRange;
        maxDataPoints?: number;
        intervalMs?: number;
    }, signal?: AbortSignal): Promise<{
        data: _grafana_data.DataFrame[];
    }>;
    testDatasource(): Promise<{
        status: string;
        message: string;
    }>;
    metricFindQuery(query: unknown): Promise<{
        text: string;
        value: string;
    }[]>;
    /** Annotation query support — returns event frames. */
    annotationQuery(options: {
        range: TimeRange;
        annotation: Record<string, unknown>;
    }): Promise<_grafana_data.DataFrame>;
};

interface PrometheusQuery extends DataQuery {
    expr?: string;
    legendFormat?: string;
    interval?: string;
    instant?: boolean;
    range?: boolean;
    exemplar?: boolean;
    format?: "time_series" | "table" | "heatmap";
    editorMode?: "code" | "builder";
    utcOffsetSec?: number;
}
interface LokiQuery extends DataQuery {
    expr?: string;
    legendFormat?: string;
    maxLines?: number;
    queryType?: "range" | "instant" | "stream";
    editorMode?: "code" | "builder";
}
interface SqlQuery extends DataQuery {
    rawSql?: string;
    format?: number;
    dataset?: string;
    table?: string;
    rawQuery?: boolean;
}
interface TestDataQuery extends DataQuery {
    scenarioId?: string;
    alias?: string;
    stringInput?: string;
    points?: Array<[number, number]>;
    stream?: {
        type?: string;
        speed?: number;
        spread?: number;
        noise?: number;
    };
    lines?: number;
    channel?: string;
    seriesCount?: number;
    noise?: number;
}
interface GraphiteQuery extends DataQuery {
    target?: string;
    textEditor?: boolean;
}
interface InfluxQuery extends DataQuery {
    query?: string;
    rawQuery?: boolean;
    policy?: string;
    resultFormat?: string;
}
interface CloudWatchQuery extends DataQuery {
    queryMode?: "Metrics" | "Logs" | "Annotations";
    region?: string;
    namespace?: string;
    metricName?: string;
    expression?: string;
    dimensions?: Record<string, string | string[]>;
    statistic?: string;
    period?: string;
    matchExact?: boolean;
}
interface JaegerQuery extends DataQuery {
    query?: string;
    service?: string;
    operation?: string;
    tags?: string;
    minDuration?: string;
}
interface PyroscopeQuery extends DataQuery {
    query?: string;
    profileTypeId?: string;
    labelSelector?: string;
    groupBy?: string[];
}
interface AzureMonitorQuery extends DataQuery {
    queryType?: string;
    azureMonitor?: Record<string, unknown>;
    subscription?: string;
    resourceGroup?: string;
    metricNamespace?: string;
    metricName?: string;
    aggregation?: string;
}
interface ElasticsearchQuery extends DataQuery {
    query?: string;
    metrics?: unknown[];
    bucketAggs?: unknown[];
    timeField?: string;
}
interface TempoQuery extends DataQuery {
    query?: string;
    queryType?: string;
    limit?: number;
}
/** Build a sensible default query payload for a datasource type. */
declare function defaultQueryForType(type: string, refId?: string): DataQuery;
/**
 * Switch an existing query to a new datasource: keep refId/hide, reset type-specific fields.
 */
declare function switchQueryDatasource(current: DataQuery, ds: {
    type: string;
    uid?: string;
    name?: string;
}): DataQuery;
declare function interpolateQuery(query: DataQuery, replace: (s: string) => string): DataQuery;

/** Normalize Grafana datasource type ids and map to editor field families. */
type QueryFieldFamily = "prometheus" | "loki" | "sql" | "influxdb" | "graphite" | "cloudwatch" | "testdata" | "elasticsearch" | "tempo" | "jaeger" | "pyroscope" | "azure" | "grafana" | "dashboard" | "mixed" | "alertmanager" | "zabbix" | "opentelemetry" | "signoz" | "generic";
/** Canonical plugin id for registry lookup. */
declare function normalizeDsType(type: string | undefined | null): string;
/** Which specialized field UI to show. */
declare function queryFieldFamily(type: string | undefined | null): QueryFieldFamily;
declare const DS_TYPE_LABELS: Record<string, string>;
declare function dsTypeLabel(type: string | undefined | null): string;
/** Short badge text for query tabs. */
declare function dsTypeBadge(type: string | undefined | null): string;

/**
 * Grafana `/api/ds/query` response adapter (hand-written, no zod/rxjs).
 * Accepts both wire format (schema+data.values) and already-normalized frames.
 */

interface DsQueryWireField {
    name?: string;
    type?: string;
    config?: Record<string, unknown>;
    labels?: Record<string, string>;
    values?: unknown[];
}
interface DsQueryWireFrame {
    schema?: {
        name?: string;
        refId?: string;
        fields?: DsQueryWireField[];
        meta?: Record<string, unknown>;
    };
    data?: {
        values?: unknown[][];
    };
    /** already flat */
    fields?: DsQueryWireField[];
    name?: string;
    refId?: string;
}
interface DsQueryWireResult {
    frames?: DsQueryWireFrame[];
    error?: string;
    status?: number;
}
interface DsQueryWireResponse {
    results?: Record<string, DsQueryWireResult>;
    message?: string;
}
/** Map Grafana wire frames into DataFrame[]. */
declare function wireResponseToDataFrames(raw: DsQueryWireResponse, fallbackRefIds?: string[]): DataFrame[];

/** PromQL dashboard macros: $__interval, $__rate_interval, $__range, $__range_s, $__range_ms */
declare function computeStepMs(opts: {
    rangeMs: number;
    maxDataPoints?: number;
    minIntervalMs?: number;
    step?: number | string;
    intervalMs?: number;
}): number;
declare function parseDurationMs(input: string): number;
declare function formatDurationProm(ms: number): string;
declare function interpolatePromMacros(expr: string, ctx: {
    rangeMs: number;
    intervalMs: number;
    rateIntervalMs?: number;
    interpolate?: (s: string) => string;
}): string;

interface PromApiResponse {
    status?: string;
    data?: {
        resultType?: string;
        result?: any[];
    };
    error?: string;
    errorType?: string;
}
declare function mapPrometheusResponse(body: PromApiResponse, opts: {
    refId: string;
    legendFormat?: string;
    expr?: string;
}): DataFrame[];

/** Pure Prom legend formatting — shared by prometheus DS and response mappers. */
declare function formatPromLegend(legendFormat: string, labels?: Record<string, string>): string;

/**
 * Runtime factory for Prometheus DS — avoids plugin packages importing dashboard prometheus module.
 * Built-in prometheus module registers the factory on load.
 */

type PrometheusDataSourceFactory = (instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta) => {
    query: (request: any, signal?: AbortSignal) => Promise<{
        data: any[];
    }>;
    [key: string]: unknown;
};
declare function registerPrometheusDataSourceFactory(fn: PrometheusDataSourceFactory): void;
declare function createPrometheusDataSource(instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta): {
    [key: string]: unknown;
    query: (request: any, signal?: AbortSignal) => Promise<{
        data: any[];
    }>;
};
declare function hasPrometheusDataSourceFactory(): boolean;
/** Test helper */
declare function resetPrometheusDataSourceFactory(): void;

/**
 * Runtime factory for SigNoz DS — avoids vue-datasources importing plugin-signoz
 * (plugin-signoz already depends on vue-datasources).
 */

type SignozDataSourceFactory = (instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta) => {
    query: (request: any, signal?: AbortSignal) => Promise<{
        data: any[];
    }>;
    [key: string]: unknown;
};
declare function registerSignozDataSourceFactory(fn: SignozDataSourceFactory): void;
declare function createSignozDataSource(instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta): {
    [key: string]: unknown;
    query: (request: any, signal?: AbortSignal) => Promise<{
        data: any[];
    }>;
};
declare function hasSignozDataSourceFactory(): boolean;
/** Test helper */
declare function resetSignozDataSourceFactory(): void;

interface DsQueryRequestBody {
    queries: Array<Record<string, unknown>>;
    from: string;
    to: string;
}
/** Dispatch builder by datasource type id. */
declare function buildQueryBodyForType(type: string, queries: DataQuery[], range: {
    from: number;
    to: number;
}, opts?: {
    uid?: string;
    maxDataPoints?: number;
    intervalMs?: number;
}): DsQueryRequestBody;

export { DATASOURCE_IDS, DS_TYPE_LABELS, buildQueryBodyForType, catalogCoversDatasourceIds, computeStepMs, createBuiltinDataSourceApi, createPrometheusDataSource, createSignozDataSource, defaultQueryForType, dsTypeBadge, dsTypeLabel, ensureDatasourceCatalogEntryRegistered, formatDurationProm, formatPromLegend, getBuiltinDatasourceCatalogEntry, hasPrometheusDataSourceFactory, hasSignozDataSourceFactory, interpolatePromMacros, interpolateQuery, isValidPromql, listBuiltinDatasourceCatalog, mapPrometheusResponse, normalizeDsType, parseDurationMs, parsePromqlToAst, queryFieldFamily, registerPrometheusDataSourceFactory, registerSignozDataSourceFactory, resetPrometheusDataSourceFactory, resetSignozDataSourceFactory, sanitizePromqlForLezer, switchQueryDatasource, wireResponseToDataFrames };
export type { AzureMonitorQuery, BuiltinDataSourceId, BuiltinDatasourceCatalogEntry, BuiltinDatasourceCategory, CloudWatchQuery, ElasticsearchQuery, GraphiteQuery, InfluxQuery, JaegerQuery, LokiQuery, PrometheusQuery, PromqlAstParseResult, PromqlDiagnostic, PromqlDiagnosticSeverity, PromqlRange, PyroscopeQuery, QueryFieldFamily, SqlQuery, TempoQuery, TestDataQuery };

// ----- @grafana/zabbix -----
declare function registerZabbixPlugin(): Promise<void>;

declare const READ_METHOD_LIST: readonly ["alert.get", "apiinfo.version", "application.get", "discoveryrule.get", "event.get", "history.get", "host.get", "hostgroup.get", "item.get", "itemprototype.get", "problem.get", "proxy.get", "script.get", "service.get", "service.getsla", "sla.get", "sla.getsli", "trend.get", "trigger.get", "user.get", "usermacro.get", "valuemap.get"];
declare const WRITE_METHOD_LIST: readonly ["event.acknowledge", "script.execute"];
type ZabbixMethod = (typeof READ_METHOD_LIST)[number] | (typeof WRITE_METHOD_LIST)[number];

interface ZabbixCacheKey {
    uid: string;
    majorVersion: number;
    method: ZabbixMethod;
    params: Record<string, unknown>;
}
declare class ZabbixMetadataCache {
    private entries;
    private inflight;
    load<T>(key: ZabbixCacheKey, ttlMs: number, consumerSignal: AbortSignal | undefined, loader: (sharedSignal: AbortSignal) => Promise<T>): Promise<T>;
    private bindConsumer;
    invalidate(uid: string, methods: readonly ZabbixMethod[]): void;
    clearUid(uid: string): void;
    clear(): void;
    private evictIfNeeded;
}

interface HostTagFilter {
    tag: string;
    value: string;
    operator: 0 | 1 | 2 | 3 | 4 | 5;
}
interface ZabbixItem {
    itemid: string;
    name: string;
    key_: string;
    hostid: string;
    value_type: string;
    units?: string;
    delay?: string;
    status?: string;
    state?: string;
    valuemapid?: string;
    tags?: Array<{
        tag: string;
        value: string;
    }>;
    hosts?: Array<{
        hostid: string;
        name: string;
        host?: string;
    }>;
    lastvalue?: string;
    lastclock?: string;
    itemDiscovery?: {
        itemdiscoveryid?: string;
        itemid?: string;
        parent_itemid?: string;
        key_?: string;
        lastcheck?: string;
        status?: string;
        ts_delete?: string;
        ts_disable?: string;
        disable_source?: string;
        [key: string]: unknown;
    };
    [key: string]: unknown;
}
interface ZabbixHistoryPoint {
    itemid: string;
    clock: string;
    ns?: string;
    value: string;
    timestamp?: string;
    source?: string;
    severity?: string;
    logeventid?: string;
}
interface ZabbixTrendPoint {
    itemid: string;
    clock: string;
    num: string;
    value_min: string;
    value_avg: string;
    value_max: string;
}
interface ZabbixProblem {
    eventid: string;
    objectid: string;
    name: string;
    severity: string;
    clock: string;
    acknowledged: string;
    [key: string]: unknown;
}
interface ZabbixVariableOption {
    text: string;
    value: string;
    id?: string;
}
interface ZabbixDiscoveryRule {
    itemid: string;
    name: string;
    key_: string;
}
interface ZabbixItemPrototype {
    itemid: string;
    ruleid: string;
    name: string;
    key_: string;
}
interface ZabbixScript {
    scriptid: string;
    name: string;
    type: string;
    execute_on?: string;
    scope?: string;
    host_access?: string;
    menu_path?: string;
    [key: string]: unknown;
}
interface ZabbixActionCapabilities {
    canAcknowledge: boolean;
    canClose: boolean;
    canChangeSeverity: boolean;
    canExecuteScripts: boolean;
    readOnly: boolean;
    reason?: string;
}
interface ZabbixProblemDetail extends ZabbixProblem {
    description: string;
    expression: string;
    opdata: string;
    manual_close?: string;
    hosts: Array<Record<string, unknown>>;
    groups: Array<Record<string, unknown>>;
    items: ZabbixItem[];
    tags: Array<{
        tag: string;
        value: string;
    }>;
    acknowledges: Array<Record<string, unknown>>;
    events: Array<Record<string, unknown>>;
    alerts: Array<Record<string, unknown>>;
}
type ZabbixMetadataRequest = {
    type: "groups";
    filter: string;
} | {
    type: "hosts";
    groupids: string[];
    filter: string;
    hostTags: HostTagFilter[];
} | {
    type: "applications";
    hostids: string[];
    filter: string;
} | {
    type: "items";
    hostids: string[];
    applicationids: string[];
    filter: string;
    itemTag: string;
    showDisabled: boolean;
} | {
    type: "discoveryRules";
    hostids: string[];
} | {
    type: "itemPrototypes";
    discoveryRuleId: string;
} | {
    type: "triggers";
    hostids: string[];
    filter: string;
} | {
    type: "proxies";
    filter: string;
} | {
    type: "services";
    filter: string;
} | {
    type: "slas";
    serviceids: string[];
    filter: string;
} | {
    type: "macros";
    hostids: string[];
    filter: string;
} | {
    type: "scripts";
    hostid: string;
    eventid: string;
} | {
    type: "problemDetail";
    eventid: string;
} | {
    type: "actionCapabilities";
    eventid: string;
    hostid?: string;
};
type ZabbixMetadataPageMeta = {
    /** true when result length is strictly below the configured server limit */
    complete?: boolean;
    /** true when result length reached the page limit (possible more data) */
    truncated?: boolean;
};
type ZabbixMetadataResponse = ({
    type: Exclude<ZabbixMetadataRequest["type"], "scripts" | "problemDetail" | "actionCapabilities">;
    values: ZabbixVariableOption[];
} & ZabbixMetadataPageMeta) | ({
    type: "scripts";
    values: ZabbixScript[];
} & ZabbixMetadataPageMeta) | {
    type: "problemDetail";
    value: ZabbixProblemDetail | null;
} | {
    type: "actionCapabilities";
    value: ZabbixActionCapabilities;
};

interface ZabbixTransport {
    call<T>(method: ZabbixMethod, params?: Record<string, unknown>, signal?: AbortSignal): Promise<T>;
    callWithFallback<T>(method: ZabbixMethod, params: Record<string, unknown>, fallback: T, timeoutMs: number, signal?: AbortSignal): Promise<T>;
    getVersion(signal?: AbortSignal): Promise<string>;
}

interface ZabbixPagedResult<T> {
    rows: T[];
    complete: boolean;
    truncated: boolean;
    limit: number;
}
interface ZabbixApiOptions {
    transport: ZabbixTransport;
    uid?: string;
    cache?: ZabbixMetadataCache;
    metadataTtlMs?: number;
    metadataPageLimit?: number;
}
declare class ZabbixApi {
    private versionPromise;
    private readonly transport;
    private readonly uid;
    private readonly cache?;
    private readonly metadataTtlMs;
    private readonly metadataPageLimit;
    /** Short in-flight/result cache so duplicate panels share trend/history RPCs. */
    private readonly trendHistoryCache;
    private static readonly TREND_HISTORY_TTL_MS;
    private cachedTrendHistory;
    constructor(transportOrOpts: ZabbixTransport | ZabbixApiOptions);
    get pageLimit(): number;
    private get metaTimeoutMs();
    private cachedCall;
    version(signal?: AbortSignal): Promise<string>;
    private ver;
    getGroups(filter: string, signal?: AbortSignal): Promise<ZabbixPagedResult<{
        groupid: string;
        name: string;
        [k: string]: unknown;
    }>>;
    getHosts(groupids: string[], filter: string, hostTags?: HostTagFilter[], signal?: AbortSignal, evaltype?: 0 | 2): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getApplications(hostids: string[], filter: string, signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getDiscoveryRules(hostids: string[], signal?: AbortSignal): Promise<ZabbixPagedResult<ZabbixDiscoveryRule>>;
    getItemPrototypes(discoveryRuleId: string, signal?: AbortSignal): Promise<ZabbixPagedResult<ZabbixItemPrototype>>;
    /**
     * Discovered items for LLD: always request selectItemDiscovery:'extend'.
     * Matching uses itemDiscovery.parent_itemid against selected prototype itemids
     * when provided; otherwise prototypeKeys match exact key_ of prototypes only when
     * parent relation is missing (INVALID_RESPONSE if relation required).
     */
    getDiscoveredItems(hostids: string[], discoveryRuleId: string, keyPrefixes: string[], signal?: AbortSignal, opts?: {
        prototypeIds?: string[];
        requireParentRelation?: boolean;
    }): Promise<ZabbixItem[]>;
    getDiscoveryRulesFull(hostids: string[], signal?: AbortSignal): Promise<ZabbixPagedResult<any>>;
    getItemPrototypesFull(discoveryRuleId: string, signal?: AbortSignal): Promise<ZabbixPagedResult<any>>;
    getItems(params: {
        hostids: string[];
        applicationids: string[];
        filter: string;
        itemTag: string;
        showDisabled: boolean;
        valueTypes?: string[];
        groupids?: string[];
    }, signal?: AbortSignal): Promise<ZabbixPagedResult<ZabbixItem>>;
    getItemsByIds(itemids: string[], signal?: AbortSignal): Promise<ZabbixItem[]>;
    getHistory(itemids: string[], history: number, from: number, to: number, signal?: AbortSignal, limit?: number): Promise<ZabbixHistoryPoint[]>;
    getTrends(itemids: string[], from: number, to: number, signal?: AbortSignal): Promise<ZabbixTrendPoint[]>;
    getTriggers(params: Record<string, unknown>, signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>> | number>;
    getProblems(params: Record<string, unknown>, signal?: AbortSignal): Promise<ZabbixProblem[]>;
    getEvents(params: Record<string, unknown>, signal?: AbortSignal): Promise<any[]>;
    getProxies(filter: string, signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getServices(signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getSlas(serviceids: string[], filter: string, signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getSli(params: Record<string, unknown>, signal?: AbortSignal): Promise<any[]>;
    getMacros(hostids: string[], filter: string, signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getValueMaps(signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getCurrentUser(signal?: AbortSignal): Promise<{
        userid: string;
        type?: string;
        roleid?: string;
    }>;
    getScripts(hostid: string, eventid: string, signal?: AbortSignal): Promise<ZabbixPagedResult<ZabbixScript>>;
    getProblemDetail(eventid: string, signal?: AbortSignal): Promise<ZabbixProblemDetail | null>;
    acknowledgeEvent(payload: Record<string, unknown>, signal?: AbortSignal): Promise<unknown>;
    executeScript(payload: Record<string, unknown>, signal?: AbortSignal): Promise<unknown>;
}

declare const ZABBIX_CAPABILITIES: DataSourceCapabilities;
declare function createZabbixDataSource(instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta): {
    id: number | undefined;
    uid: string;
    type: string;
    name: string;
    capabilities: DataSourceCapabilities;
    /** Surface write flag for panel four-way gate. */
    enableWrites: boolean;
    query: (request: DataSourceQueryRequest, signal?: AbortSignal) => Promise<{
        data: DataFrame[];
    }>;
    testDatasource: (signal?: AbortSignal) => Promise<{
        status: string;
        message: string;
        details: {
            version: string;
            authMode: any;
            capabilities: {
                supportsApiToken: any;
                loginUserField: any;
                slaApi: any;
                triggerHostGroupsField: any;
            } | undefined;
        };
    } | {
        status: string;
        message: any;
        details?: undefined;
    }>;
    metricFindQuery: (query: unknown, signal?: AbortSignal, context?: {
        scopedVars?: Record<string, unknown>;
    }) => Promise<{
        text: string;
        value: string;
        id?: string;
    }[]>;
    annotationQuery: (request: {
        range: TimeRange;
        annotation: Record<string, unknown>;
    }, signal?: AbortSignal) => Promise<DataFrame[]>;
    getMetadata: (request: ZabbixMetadataRequest, signal?: AbortSignal) => Promise<ZabbixMetadataResponse>;
    mutate: (request: {
        action: string;
        payload: any;
        signal?: AbortSignal;
    }) => Promise<{
        status: "blocked";
        message: string;
        data?: undefined;
    } | {
        status: "success";
        message: string;
        data: unknown;
    }>;
    dispose: () => void;
    listHostGroups: (filter?: string) => Promise<{
        text: string;
        value: string;
        id: string;
    }[]>;
    listHosts: (groupFilter?: string) => Promise<{
        text: string;
        value: string;
        id: string;
    }[]>;
    listItems: (hostFilter?: string) => Promise<{
        text: string;
        value: string;
        id: string;
    }[]>;
    api: ZabbixApi;
};

/** Minimal sanitizer: strips scripts/styles/events; optional allowlist when dangerous HTML disabled. */
declare function sanitizeProblemHtml(input: string, allowDangerousHTML: boolean): string;

interface TriggerSeverity {
    priority: number;
    severity: string;
    color: string;
    show: boolean;
}
interface ProblemsPanelOptions {
    schemaVersion: 8;
    layout: "table" | "list";
    hostField: boolean;
    hostTechNameField: boolean;
    hostGroups: boolean;
    hostProxy: boolean;
    showTags: boolean;
    statusField: boolean;
    statusIcon: boolean;
    severityField: boolean;
    ackField: boolean;
    ageField: boolean;
    opdataField: boolean;
    descriptionField: boolean;
    descriptionAtNewLine: boolean;
    showDatasourceName: boolean;
    hostsInMaintenance: boolean;
    showTriggers: "all triggers" | "unacknowledged" | "acknowledged";
    sortProblems: "default" | "lastchange" | "priority";
    limit?: number;
    fontSize: string;
    pageSize: number;
    problemTimeline: boolean;
    highlightBackground: boolean;
    highlightNewEvents: boolean;
    highlightNewerThan: string;
    customLastChangeFormat: boolean;
    lastChangeFormat: string;
    resizedColumns: Array<{
        id: string;
        value: number;
    }>;
    allowDangerousHTML: boolean;
    triggerSeverity: TriggerSeverity[];
    okEventColor: string;
    ackEventColor: string;
    markAckEvents: boolean;
    customTagColumns: string;
    /** Action capabilities — default false until gated writes are enabled. */
    allowAcknowledge: boolean;
    allowUnacknowledge: boolean;
    allowClose: boolean;
    allowChangeSeverity: boolean;
    allowSuppress: boolean;
    allowUnsuppress: boolean;
    allowExecuteScripts: boolean;
    showDetails: boolean;
}

declare const DEFAULT_PROBLEMS_OPTIONS: ProblemsPanelOptions;

declare const ZABBIX_CAPABILITY_MANIFEST: {
    readonly datasourceType: "alexanderzobnin-zabbix-datasource";
    readonly displayName: "Zabbix";
    readonly configSections: [{
        readonly id: "connection";
        readonly name: "连接";
        readonly fields: ["url", "timeout", "queryTimeout"];
        readonly required: true;
    }, {
        readonly id: "auth";
        readonly name: "认证";
        readonly fields: ["authType", "authPlacement", "runtimeCredential"];
        readonly required: true;
    }, {
        readonly id: "cache";
        readonly name: "缓存与趋势";
        readonly fields: ["cacheTTL", "trends", "trendsFrom", "trendsRange"];
    }, {
        readonly id: "limits";
        readonly name: "限制";
        readonly fields: ["historyMaxPoints", "metadataPageSize", "itemLimit"];
    }, {
        readonly id: "directDb";
        readonly name: "Direct DB";
        readonly fields: ["dbConnectionDatasourceUid", "dbConnectionDatasourceType"];
    }, {
        readonly id: "writes";
        readonly name: "写操作";
        readonly fields: ["enableWrites", "acknowledge", "scriptExecute"];
    }];
    readonly profiles: [{
        readonly id: "default";
        readonly name: "默认";
        readonly signals: ["metrics", "logs", "problems", "events"];
        readonly queryModes: ["0", "1", "2", "3", "4", "5", "6", "lld"];
    }];
    readonly queryModes: [{
        readonly id: "0";
        readonly name: "指标 (Metrics)";
        readonly signal: "metrics";
        readonly notes: "含 LLD：queryType 0 + executionMode lld";
    }, {
        readonly id: "1";
        readonly name: "IT 服务";
        readonly signal: "metrics";
    }, {
        readonly id: "2";
        readonly name: "文本指标";
        readonly signal: "logs";
    }, {
        readonly id: "3";
        readonly name: "Item ID";
        readonly signal: "metrics";
    }, {
        readonly id: "4";
        readonly name: "触发器";
        readonly signal: "events";
    }, {
        readonly id: "5";
        readonly name: "问题";
        readonly signal: "problems";
    }, {
        readonly id: "6";
        readonly name: "用户宏";
        readonly signal: "events";
    }, {
        readonly id: "lld";
        readonly name: "低级发现 (LLD)";
        readonly signal: "metrics";
        readonly notes: "queryType 0 + executionMode lld，非独立 queryType";
    }, {
        readonly id: "annotation";
        readonly name: "注解";
        readonly signal: "events";
    }, {
        readonly id: "variable";
        readonly name: "变量";
        readonly signal: "events";
    }];
    readonly dataKinds: [{
        readonly id: "zabbix.history.numeric";
        readonly name: "数值历史";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "history"];
        readonly queryModeIds: ["0", "3"];
        readonly semanticKind: "timeseries.numeric";
        readonly preferredVisualisationType: "timeseries";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "number";
            readonly required: true;
        }];
        readonly recommendedPanels: ["timeseries", "trend", "barchart"];
        readonly supportedPanels: ["timeseries", "trend", "barchart", "stat", "table", "debug"];
        readonly fixture: "zabbix/history-numeric";
        readonly liveEvidenceCase: "zabbix-history-numeric";
    }, {
        readonly id: "zabbix.trend.numeric";
        readonly name: "趋势聚合";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "trends"];
        readonly queryModeIds: ["0"];
        readonly semanticKind: "timeseries.trend";
        readonly preferredVisualisationType: "timeseries";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "number";
            readonly required: true;
        }];
        readonly recommendedPanels: ["timeseries", "trend"];
        readonly supportedPanels: ["timeseries", "trend", "table", "debug"];
        readonly fixture: "zabbix/trend-numeric";
        readonly liveEvidenceCase: "zabbix-trend-numeric";
    }, {
        readonly id: "zabbix.latest.scalar";
        readonly name: "最新标量";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query"];
        readonly queryModeIds: ["0", "3"];
        readonly semanticKind: "scalar.latest";
        readonly preferredVisualisationType: "stat";
        readonly fields: [{
            readonly name: "Value";
            readonly type: "number";
            readonly required: true;
        }];
        readonly recommendedPanels: ["stat", "gauge", "bargauge"];
        readonly supportedPanels: ["stat", "gauge", "bargauge", "table", "debug"];
        readonly fixture: "zabbix/latest-scalar";
        readonly liveEvidenceCase: "zabbix-latest-scalar";
    }, {
        readonly id: "zabbix.state.samples";
        readonly name: "状态采样";
        readonly signal: "events";
        readonly requiredCapabilities: ["query"];
        readonly queryModeIds: ["0"];
        readonly semanticKind: "status.samples";
        readonly preferredVisualisationType: "status-history";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "string";
            readonly required: true;
        }];
        readonly recommendedPanels: ["status-history", "state-timeline"];
        readonly supportedPanels: ["status-history", "state-timeline", "table", "debug"];
        readonly fixture: "zabbix/state-samples";
        readonly liveEvidenceCase: "zabbix-state-samples";
    }, {
        readonly id: "zabbix.log.text";
        readonly name: "日志/文本";
        readonly signal: "logs";
        readonly requiredCapabilities: ["query"];
        readonly queryModeIds: ["2"];
        readonly semanticKind: "logs.raw";
        readonly preferredVisualisationType: "logs";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Line";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "source";
            readonly type: "string";
            readonly required: false;
        }, {
            readonly name: "severity";
            readonly type: "number";
            readonly required: false;
        }];
        readonly recommendedPanels: ["logs", "logstable"];
        readonly supportedPanels: ["logs", "logstable", "table", "debug"];
        readonly fixture: "zabbix/log-text";
        readonly liveEvidenceCase: "zabbix-log-text";
    }, {
        readonly id: "zabbix.problems";
        readonly name: "问题/触发器事件";
        readonly signal: "problems";
        readonly requiredCapabilities: ["query", "problems"];
        readonly queryModeIds: ["4", "5"];
        readonly semanticKind: "problems.events";
        readonly preferredVisualisationType: "table";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Problem";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "Severity";
            readonly type: "number";
            readonly required: false;
        }, {
            readonly name: "Host";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["alexanderzobnin-zabbix-triggers-panel", "table"];
        readonly supportedPanels: ["alexanderzobnin-zabbix-triggers-panel", "table", "status-history", "debug"];
        readonly fixture: "zabbix/problems";
        readonly liveEvidenceCase: "zabbix-problems";
    }, {
        readonly id: "zabbix.service.sla";
        readonly name: "服务/SLA";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "services"];
        readonly queryModeIds: ["1"];
        readonly semanticKind: "service.sla";
        readonly preferredVisualisationType: "stat";
        readonly fields: [{
            readonly name: "Service";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "number";
            readonly required: true;
        }];
        readonly recommendedPanels: ["stat", "gauge", "table"];
        readonly supportedPanels: ["stat", "gauge", "table", "debug"];
        readonly fixture: "zabbix/service-sla";
        readonly liveEvidenceCase: "zabbix-service-sla";
    }, {
        readonly id: "zabbix.macros";
        readonly name: "用户宏";
        readonly signal: "events";
        readonly requiredCapabilities: ["query", "macros"];
        readonly queryModeIds: ["6"];
        readonly semanticKind: "macros.table";
        readonly preferredVisualisationType: "table";
        readonly fields: [{
            readonly name: "Macro";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "string";
            readonly required: true;
        }];
        readonly recommendedPanels: ["table"];
        readonly supportedPanels: ["table", "debug"];
        readonly fixture: "zabbix/macros";
        readonly liveEvidenceCase: "zabbix-macros";
    }, {
        readonly id: "zabbix.lld";
        readonly name: "低级发现";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "lld"];
        readonly queryModeIds: ["lld", "0"];
        readonly semanticKind: "lld.tabular";
        readonly preferredVisualisationType: "table";
        readonly fields: [{
            readonly name: "Prototype";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["table"];
        readonly supportedPanels: ["table", "stat", "debug"];
        readonly fixture: "zabbix/lld";
        readonly liveEvidenceCase: "zabbix-lld";
    }];
    readonly processingFunctions: ["groupBy", "scale", "offset", "delta", "rate", "movingAverage", "exponentialMovingAverage", "percentile", "removeAboveValue", "removeBelowValue", "transformNull", "aggregateBy", "sumSeries", "percentileAgg", "top", "bottom", "sortSeries", "trendValue", "timeShift", "setAlias", "setAliasByRegex", "replaceAlias", "consolidateBy"];
    readonly actions: ["event.acknowledge", "script.execute"];
};

declare const ZABBIX_PANEL_ID = "alexanderzobnin-zabbix-triggers-panel";
declare const ZABBIX_DATASOURCE_ID = "alexanderzobnin-zabbix-datasource";

export { DEFAULT_PROBLEMS_OPTIONS, ZABBIX_CAPABILITIES, ZABBIX_CAPABILITY_MANIFEST, ZABBIX_DATASOURCE_ID, ZABBIX_PANEL_ID, createZabbixDataSource, registerZabbixPlugin, sanitizeProblemHtml };

// ----- @grafana/signoz -----
declare function registerSigNozPlugin(): Promise<void>;

/**
 * SigNoz trace waterfall + related logs (Task 16C).
 * Capability evidence only — no invented Argus/Native parity.
 */

interface WaterfallSpan {
    spanId: string;
    parentSpanId: string;
    name: string;
    service: string;
    /** start time ms — keep numeric for charts; raw nanos preserved separately */
    timeUnixMs: number;
    /** duration nanoseconds as string (preserve precision) */
    durationNano: string;
    durationMs: number;
    statusCode?: string;
    hasError?: boolean;
    resource?: Record<string, unknown>;
    attributes?: Record<string, unknown>;
    events?: unknown[];
    links?: unknown[];
    /** v4 may have references[]; v3 may omit */
    references?: unknown[];
    raw?: unknown;
}
interface WaterfallDetail {
    candidateId: string;
    path: string;
    status: number;
    startMs?: number;
    endMs?: number;
    rootService?: string;
    entryPoint?: string;
    missingCount?: number;
    totalCount?: number;
    errorCount?: number;
    uncollapsed?: string[];
    hasMore?: boolean;
    spans: WaterfallSpan[];
    raw: unknown;
}
/** Official profiles default: no write actions. */
declare function issuesWriteEnabled(args: {
    profileId: string;
    enableWrites?: boolean;
    envGate?: boolean;
    hasAcknowledgeEndpoint?: boolean;
    hasResolveEndpoint?: boolean;
    /** Task 14B VERIFIED for Argus/custom only */
    actionCapabilityVerified?: boolean;
}): {
    acknowledge: boolean;
    resolve: boolean;
};

interface UpstreamExportResult {
    mode: "upstream";
    filename: string;
    contentType: string;
    body: Uint8Array | string;
    size: number;
}
interface CursorExportResult {
    mode: "cursor_pages";
    format: "json" | "csv";
    filename: string;
    body: string;
    pages: number;
    rows: number;
    complete: boolean;
    truncatedByUpstream: boolean;
}
interface LoadedOnlyExportResult {
    mode: "loaded_only";
    format: "json" | "csv";
    filename: string;
    body: string;
    rows: number;
    /** explicit: this is NOT upstream full export */
    disclaimer: "EXPORT_LOADED_ONLY";
}
type ExportResult = UpstreamExportResult | CursorExportResult | LoadedOnlyExportResult;

type SigNozSignal = "metrics" | "logs" | "traces";
type SigNozQueryMode = "builder" | "promql" | "clickhouse_sql";
type SigNozApiProfileId = "signoz-v3" | "signoz-v5" | "prometheus-compatible" | "custom" | "signoz-v4" | "argus-v5";
type SigNozCredentialKind = "bearer" | "signozApiKey" | "apiKey" | "headers" | "session" | "proxy";
type SigNozFetchCredentials = "omit" | "same-origin" | "include";
interface SigNozField {
    name: string;
    fieldDataType: "string" | "float64" | "int64" | "bool";
    fieldContext: "tag" | "resource" | "scope";
}
interface SigNozMetricMeta {
    metricName: string;
    description: string;
    type: string;
    unit: string;
    temporality: string;
    isMonotonic: boolean;
}
interface SigNozDataSourceOptions extends DataSourceJsonData {
    /** live = real network; fixture = offline fixtures only (tests). Default live. */
    dataMode?: "live" | "fixture";
    schema: 1;
    apiProfile: SigNozApiProfileId;
    organizationId?: string;
    defaultEnvironment?: string;
    timeout: number;
    metadataCacheTTL: string;
    rawPageSize?: number;
    liveTailIntervalMs?: number;
    maxConcurrentRequests?: number;
    customMetricsPath?: string;
    customLogsPath?: string;
    customTracesPath?: string;
    customAlertsPath?: string;
    customTraceByIdPath?: string;
    customMetadataPath?: string;
    customHealthPath?: string;
    customMetricsListPath?: string;
    customFieldsKeysPath?: string;
    customFieldsValuesPath?: string;
    customAcknowledgePath?: string;
    customResolvePath?: string;
    credentialKind: SigNozCredentialKind;
    credentialHeaderName?: string;
    fetchCredentials?: SigNozFetchCredentials;
    customHealthOk: boolean;
    customHealthSignature: string;
    /** experimental capabilities verified for this UID (never invent) */
    experimentalCapabilities?: {
        distribution?: boolean;
        builderSubQuery?: boolean;
        builderJoin?: boolean;
        anomaly?: boolean;
        /** SSE live tail Content-Type verified for this UID */
        liveTailSse?: boolean;
        /** legacy /api/v1/logs/tail verified */
        liveTailLegacy?: boolean;
        /** POST export_raw_data verified */
        exportRaw?: boolean;
        waterfallV3Observed?: boolean;
        actionsVerified?: boolean;
    };
}
type SigNozMetadataResponse = {
    type: "metrics";
    values: SigNozMetricMeta[];
} | {
    type: "services" | "operations" | "attributeValues";
    values: string[];
} | {
    type: "attributeKeys";
    values: SigNozField[];
} | {
    type: "traceById" | "relatedLogs" | "alerts";
    frames: DataFrame[];
};

interface EndpointSpec {
    path: string;
    method?: "GET" | "POST";
}
interface SigNozApiProfile {
    id: SigNozApiProfileId | string;
    signals: SigNozSignal[];
    endpoints: {
        metricsQuery?: EndpointSpec;
        logsQuery?: EndpointSpec;
        tracesQuery?: EndpointSpec;
        alertsQuery?: EndpointSpec;
        traceById?: EndpointSpec;
        metadata?: EndpointSpec;
        /** primary health endpoint (first candidate) */
        health?: EndpointSpec;
        /** ordered health candidates (v2 then v1 by default) */
        healthCandidates?: EndpointSpec[];
        version?: EndpointSpec;
        metricsList?: EndpointSpec;
        fieldsKeys?: EndpointSpec;
        fieldsValues?: EndpointSpec;
        services?: EndpointSpec;
        attributeKeys?: EndpointSpec;
        attributeValues?: EndpointSpec;
        acknowledge?: EndpointSpec;
        resolve?: EndpointSpec;
        /** GET text/event-stream live tail (Native v3) */
        liveTail?: EndpointSpec;
        /** legacy GET /api/v1/logs/tail — off unless probe VERIFIED */
        liveTailLegacy?: EndpointSpec;
        /** POST upstream full raw export */
        exportRaw?: EndpointSpec;
        /** POST ClickHouse variables query */
        variablesQuery?: EndpointSpec;
    };
    /** preferred credential modes for this profile */
    credentialModes?: string[];
    defaultCredentialHeader?: string;
    formulaServerSide?: boolean;
    supportsServerFormula?: boolean;
    queryModesBySignal: Record<SigNozSignal, SigNozQueryMode[]>;
    isHealthy?: (status: number, data: unknown) => boolean;
}
declare const SIGNOZ_PROFILES: Record<string, SigNozApiProfile>;
/** True for official SigNoz v5 and Argus APM v5 (same wire envelope, different base paths). */
declare function isV5WireProfile(id: string | undefined | null): boolean;
declare function resolveSigNozProfile(options: Partial<SigNozDataSourceOptions> | undefined): SigNozApiProfile;

type MetricFindValue = {
    text: string;
    value: string;
};

type LiveTailState = "idle" | "connecting" | "live" | "paused" | "retrying" | "stopped" | "error";
type LiveTailTransport = "sse" | "cursor_poll" | "none";
interface LiveTailRow {
    timestamp: number;
    data: unknown;
    /** stable row id for dedupe (not SSE event id) */
    rowId: string;
}
interface LiveTailSession {
    readonly sessionId: number;
    readonly state: LiveTailState;
    readonly transport: LiveTailTransport;
    readonly rows: readonly LiveTailRow[];
    start(): Promise<void>;
    pause(): void;
    resume(): void;
    stop(): void;
    /** cancel + mark stopped; safe on unmount / UID switch */
    dispose(): void;
}

declare const SIGNOZ_CAPABILITIES: DataSourceCapabilities;
declare function createSignozDataSource(instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta): {
    uid: string;
    name: string;
    type: string;
    meta: DataSourcePluginMeta;
    capabilities: {
        signals: _grafana_vue_plugin_sdk.TelemetrySignal[];
        query: boolean;
        health: boolean;
        metadata: boolean;
        variables: boolean;
        annotations: boolean;
        exemplars: boolean;
        streaming: boolean;
        queryLanguages: string[];
    };
    query(request: any, signal?: AbortSignal): Promise<{
        data: DataFrame[];
    }>;
    testDatasource(signal?: AbortSignal): Promise<{
        status: string;
        message: string;
    }>;
    listServices: (signal?: AbortSignal) => Promise<{
        text: string;
        value: string;
    }[]>;
    metricFindQuery(query: unknown, signal?: AbortSignal): Promise<MetricFindValue[]>;
    annotationQuery(request: {
        range: TimeRange;
        annotation: Record<string, unknown>;
    }, signal?: AbortSignal): Promise<DataFrame[]>;
    getMetadata(request: any, signal?: AbortSignal): Promise<SigNozMetadataResponse>;
    /** Capability-gated live tail session. Switching UID/query should dispose prior session. */
    startLiveTail(args?: {
        sessionKey?: string;
        filterExpression?: string;
        startMs?: number;
        onState?: (state: string, detail?: string) => void;
        onRows?: (rows: any[], meta: any) => void;
        onError?: (err: Error, sessionId: number) => void;
    }): LiveTailSession;
    stopLiveTail(sessionKey?: string): void;
    exportRawData(args?: {
        format?: "json" | "csv";
        preferLoadedOnly?: boolean;
        loadedRows?: unknown[];
        loadedFrames?: DataFrame[];
        upstreamBody?: unknown;
        signal?: AbortSignal;
        onProgress?: (p: any) => void;
    }): Promise<ExportResult>;
    getTraceWaterfall(args: {
        traceId: string;
        selectedSpanId?: string;
        uncollapsedSpans?: string[];
        limit?: number;
    }, signal?: AbortSignal): Promise<{
        frames: DataFrame[];
        detail: {
            candidateId: string;
            path: string;
            status: number;
            rootService: string;
            entryPoint: string;
            spans: {
                spanId: string;
                parentSpanId: string;
                name: string;
                service: string;
                timeUnixMs: number;
                durationNano: string;
                durationMs: number;
                attributes: {
                    "http.method": string;
                };
                events: never[];
            }[];
            raw: {
                offline: boolean;
            };
        };
    } | {
        frames: DataFrame[];
        detail: WaterfallDetail;
    }>;
    getIssuesWriteCapabilities(): {
        acknowledge: boolean;
        resolve: boolean;
    };
    mutate: (request: {
        action: string;
        payload: any;
        signal?: AbortSignal;
    }) => Promise<{
        status: "error";
        message: string;
        data?: undefined;
    } | {
        status: "success";
        message: string;
        data: any;
    }>;
};

declare const SIGNOZ_CAPABILITY_MANIFEST: {
    readonly datasourceType: "signoz";
    readonly displayName: "SigNoz";
    readonly configSections: [{
        readonly id: "connection";
        readonly name: "连接";
        readonly fields: ["url", "apiProfile", "timeout"];
        readonly required: true;
    }, {
        readonly id: "auth";
        readonly name: "认证";
        readonly fields: ["runtimeApiKey", "credentialHeader", "credentialMode"];
        readonly required: true;
    }, {
        readonly id: "health";
        readonly name: "健康检查";
        readonly fields: ["healthPath", "healthFallback", "customHealthOk"];
    }, {
        readonly id: "customEndpoints";
        readonly name: "自定义端点";
        readonly fields: ["customHealth", "customMetrics", "customLogs", "customTraces", "customMetadata"];
    }];
    readonly profiles: [{
        readonly id: "prometheus-compatible";
        readonly name: "Prometheus 兼容";
        readonly signals: ["metrics"];
        readonly queryModes: ["promql"];
        readonly healthPaths: ["/api/v1/status/buildinfo"];
    }, {
        readonly id: "signoz-v3";
        readonly name: "SigNoz v3";
        readonly signals: ["metrics", "logs", "traces"];
        readonly queryModes: ["builder", "promql", "clickhouse_sql"];
        readonly healthPaths: ["/api/v1/health"];
    }, {
        readonly id: "argus-v5";
        readonly name: "Argus v5";
        readonly signals: ["metrics", "logs", "traces"];
        readonly queryModes: ["builder", "promql", "clickhouse_sql"];
        readonly healthPaths: ["/api/apm/v1/health", "/api/apm/v2/healthz"];
    }, {
        readonly id: "signoz-v5";
        readonly name: "SigNoz v5 (Native)";
        readonly signals: ["metrics", "logs", "traces"];
        readonly queryModes: ["builder", "promql", "clickhouse_sql"];
        readonly healthPaths: ["/api/v2/healthz", "/api/v1/health"];
    }, {
        readonly id: "custom";
        readonly name: "自定义";
        readonly signals: ["metrics", "logs", "traces"];
        readonly queryModes: ["builder", "promql", "clickhouse_sql"];
        readonly healthPaths: [];
    }];
    readonly queryModes: [{
        readonly id: "metrics.builder";
        readonly name: "Metrics Builder";
        readonly signal: "metrics";
        readonly requestTypes: ["time_series", "scalar"];
    }, {
        readonly id: "metrics.promql";
        readonly name: "PromQL";
        readonly signal: "metrics";
        readonly requestTypes: ["time_series", "scalar"];
    }, {
        readonly id: "metrics.clickhouse_sql";
        readonly name: "Metrics ClickHouse SQL";
        readonly signal: "metrics";
        readonly requestTypes: ["time_series", "scalar", "raw"];
    }, {
        readonly id: "logs.builder";
        readonly name: "Logs Builder";
        readonly signal: "logs";
        readonly requestTypes: ["time_series", "raw", "raw_stream"];
    }, {
        readonly id: "logs.raw";
        readonly name: "Logs Raw";
        readonly signal: "logs";
        readonly requestTypes: ["raw", "raw_stream"];
    }, {
        readonly id: "logs.live_tail";
        readonly name: "Logs Live Tail";
        readonly signal: "logs";
        readonly requestTypes: ["raw_stream"];
    }, {
        readonly id: "logs.clickhouse_sql";
        readonly name: "Logs ClickHouse SQL";
        readonly signal: "logs";
        readonly requestTypes: ["raw"];
    }, {
        readonly id: "traces.builder";
        readonly name: "Traces Builder";
        readonly signal: "traces";
        readonly requestTypes: ["trace", "time_series", "raw"];
    }, {
        readonly id: "traces.raw";
        readonly name: "Traces Raw / SQL";
        readonly signal: "traces";
        readonly requestTypes: ["raw", "trace"];
    }, {
        readonly id: "service_map";
        readonly name: "Service Map";
        readonly signal: "topology";
        readonly requestTypes: ["time_series"];
    }, {
        readonly id: "issues";
        readonly name: "Issues / Exceptions";
        readonly signal: "events";
        readonly requestTypes: ["raw"];
    }];
    readonly dataKinds: [{
        readonly id: "signoz.metrics.timeseries";
        readonly name: "指标时序";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "metrics"];
        readonly queryModeIds: ["metrics.builder", "metrics.promql"];
        readonly semanticKind: "timeseries.metric";
        readonly preferredVisualisationType: "timeseries";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Value";
            readonly type: "number";
            readonly required: true;
        }];
        readonly recommendedPanels: ["timeseries", "barchart", "trend"];
        readonly supportedPanels: ["timeseries", "barchart", "trend", "stat", "table", "debug"];
        readonly fixture: "signoz/v5/time_series";
        readonly liveEvidenceCase: "signoz-metrics-timeseries";
    }, {
        readonly id: "signoz.metrics.scalar";
        readonly name: "指标标量/Top-N";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "metrics"];
        readonly queryModeIds: ["metrics.builder", "metrics.promql"];
        readonly semanticKind: "scalar.metric";
        readonly preferredVisualisationType: "stat";
        readonly fields: [{
            readonly name: "Value";
            readonly type: "number";
            readonly required: true;
        }, {
            readonly name: "Name";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["stat", "gauge", "bargauge", "table"];
        readonly supportedPanels: ["stat", "gauge", "bargauge", "table", "piechart", "debug"];
        readonly fixture: "signoz/v5/scalar_columns";
        readonly liveEvidenceCase: "signoz-metrics-scalar";
    }, {
        readonly id: "signoz.metrics.histogram";
        readonly name: "分布/直方图";
        readonly signal: "metrics";
        readonly requiredCapabilities: ["query", "distribution"];
        readonly queryModeIds: ["metrics.builder"];
        readonly semanticKind: "histogram.buckets";
        readonly preferredVisualisationType: "histogram";
        readonly fields: [{
            readonly name: "Bucket";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "Count";
            readonly type: "number";
            readonly required: true;
        }];
        readonly recommendedPanels: ["histogram", "heatmap"];
        readonly supportedPanels: ["histogram", "heatmap", "table", "debug"];
        readonly fixture: "signoz/v5/distribution";
        readonly liveEvidenceCase: "signoz-metrics-histogram";
    }, {
        readonly id: "signoz.logs.raw";
        readonly name: "原始日志";
        readonly signal: "logs";
        readonly requiredCapabilities: ["query", "logs"];
        readonly queryModeIds: ["logs.builder", "logs.raw"];
        readonly semanticKind: "logs.raw";
        readonly preferredVisualisationType: "logs";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Body";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "Severity";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["logs", "logstable"];
        readonly supportedPanels: ["logs", "logstable", "table", "debug"];
        readonly fixture: "signoz/logs-raw";
        readonly liveEvidenceCase: "signoz-logs-raw";
    }, {
        readonly id: "signoz.logs.stream";
        readonly name: "日志流 (Live Tail)";
        readonly signal: "logs";
        readonly requiredCapabilities: ["query", "logs", "streaming"];
        readonly queryModeIds: ["logs.live_tail"];
        readonly semanticKind: "logs.stream";
        readonly preferredVisualisationType: "logs";
        readonly fields: [{
            readonly name: "Time";
            readonly type: "time";
            readonly required: true;
        }, {
            readonly name: "Body";
            readonly type: "string";
            readonly required: true;
        }];
        readonly recommendedPanels: ["logs", "live"];
        readonly supportedPanels: ["logs", "logstable", "live", "debug"];
        readonly fixture: "signoz/logs-stream";
        readonly liveEvidenceCase: "signoz-logs-live-tail";
    }, {
        readonly id: "signoz.traces.search";
        readonly name: "链路搜索";
        readonly signal: "traces";
        readonly requiredCapabilities: ["query", "traces"];
        readonly queryModeIds: ["traces.builder"];
        readonly semanticKind: "trace.search";
        readonly preferredVisualisationType: "table";
        readonly fields: [{
            readonly name: "traceId";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "service";
            readonly type: "string";
            readonly required: false;
        }, {
            readonly name: "duration";
            readonly type: "number";
            readonly required: false;
        }, {
            readonly name: "status";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["table", "traces"];
        readonly supportedPanels: ["table", "traces", "debug"];
        readonly fixture: "signoz/traces-search";
        readonly liveEvidenceCase: "signoz-traces-search";
    }, {
        readonly id: "signoz.traces.detail";
        readonly name: "链路详情";
        readonly signal: "traces";
        readonly requiredCapabilities: ["query", "traces"];
        readonly queryModeIds: ["traces.builder"];
        readonly semanticKind: "trace.detail";
        readonly preferredVisualisationType: "trace";
        readonly fields: [{
            readonly name: "traceId";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "spanId";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "parentSpanId";
            readonly type: "string";
            readonly required: false;
        }, {
            readonly name: "startTimeMs";
            readonly type: "number";
            readonly required: true;
        }, {
            readonly name: "durationNs";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "serviceName";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "operationName";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "status";
            readonly type: "string";
            readonly required: true;
        }];
        readonly recommendedPanels: ["traces"];
        readonly supportedPanels: ["traces", "table", "debug"];
        readonly fixture: "signoz/v5/trace_detail";
        readonly liveEvidenceCase: "signoz-traces-detail";
    }, {
        readonly id: "signoz.service.graph";
        readonly name: "服务拓扑";
        readonly signal: "topology";
        readonly requiredCapabilities: ["query", "serviceMap"];
        readonly queryModeIds: ["service_map"];
        readonly semanticKind: "topology.node_edge";
        readonly preferredVisualisationType: "nodeGraph";
        readonly fields: [{
            readonly name: "id";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "source";
            readonly type: "string";
            readonly required: false;
        }, {
            readonly name: "target";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["nodeGraph"];
        readonly supportedPanels: ["nodeGraph", "table", "debug"];
        readonly fixture: "signoz/service-graph";
        readonly liveEvidenceCase: "signoz-service-graph";
    }, {
        readonly id: "signoz.issues";
        readonly name: "Issues / Exceptions";
        readonly signal: "events";
        readonly requiredCapabilities: ["query", "issues"];
        readonly queryModeIds: ["issues"];
        readonly semanticKind: "issues.table";
        readonly preferredVisualisationType: "table";
        readonly fields: [{
            readonly name: "id";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "title";
            readonly type: "string";
            readonly required: true;
        }, {
            readonly name: "status";
            readonly type: "string";
            readonly required: false;
        }];
        readonly recommendedPanels: ["signoz-issues", "table"];
        readonly supportedPanels: ["signoz-issues", "table", "debug"];
        readonly fixture: "signoz/issues";
        readonly liveEvidenceCase: "signoz-issues";
    }];
    readonly actions: [];
};

declare const SIGNOZ_PANEL_ID = "signoz-issues";
declare const SIGNOZ_DATASOURCE_ID = "signoz";

export { SIGNOZ_CAPABILITIES, SIGNOZ_CAPABILITY_MANIFEST, SIGNOZ_DATASOURCE_ID, SIGNOZ_PANEL_ID, SIGNOZ_PROFILES, createSignozDataSource, isV5WireProfile, issuesWriteEnabled, registerSigNozPlugin, resolveSigNozProfile };

// ----- bootstrap (also on ./register) -----
export declare function bootstrapGrafanaVue(): void;
