// @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 * as __ from ".";
import { TablePaginationConfig } from "ant-design-vue";
import { CompletionContext, CompletionResult } from "@codemirror/autocomplete";
import { EditorView } from "@codemirror/view";
import { Tree } from "@lezer/common";
import * as pinia from "pinia";

// ----- @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' | 'enum';
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;
    /**
     * Grafana panel timeFrom/timeShift badge text (PanelTimeRange.timeInfo).
     * Empty/undefined when no override or hideTimeOverride.
     */
    timeInfo?: string;
    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;
/**
 * Grafana getFrameDisplayName — used by seriesToRows Metric column etc.
 * @see refs/grafana-main/packages/grafana-data/src/field/fieldState.ts
 */
declare function getFrameDisplayName(frame: DataFrame, index?: number): string;
/**
 * Resolve a field by raw name first, then getFieldDisplayName (Grafana field pickers).
 * FieldNamePicker persists displayName strings; raw name alone is not enough.
 */
declare function fieldMatchesName(field: Field, name: string, frame?: DataFrame, allFrames?: DataFrame[]): boolean;
declare function findField(frame: DataFrame, name: string | undefined | null, allFrames?: DataFrame[]): Field | undefined;
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;
/** Optional parse knobs (Grafana TimeModel / timepicker.nowDelay + fiscalYearStartMonth). */
type RangeParseOptions = {
    /** Shift "now" backward by this many ms (timepicker.nowDelay). */
    nowDelayMs?: number;
    /** 0=January … 11=December — dashboard.fiscalYearStartMonth. */
    fiscalYearStartMonth?: number;
    /**
     * Dashboard weekStart for `now/w` rounding.
     * "" | monday | saturday | sunday (default monday like Grafana browser default).
     */
    weekStart?: string;
    /**
     * Dashboard timezone.
     * - `"utc"` / `"browser"` (default): calendar unit rounding in UTC or local
     * - IANA (e.g. `America/New_York`, `Asia/Shanghai`): unit rounding in that zone
     */
    timezone?: string;
};
/** True when range math should use UTC getters/setters (Grafana datemath). */
declare function isUtcTimezone(timezone?: string): boolean;
/** Non-empty IANA-like id (not browser/default/utc aliases). */
declare function isIanaTimezone(timezone?: string): boolean;
/**
 * Convert a wall-clock time in `timeZone` to a UTC Date.
 * Uses offset probe (no external tz DB dependency).
 */
declare function zonedWallTimeToUtc(parts: {
    year: number;
    month: number;
    day: number;
    hour?: number;
    minute?: number;
    second?: number;
}, timeZone: string): Date;
declare function rangeUtil_parse(raw: {
    from: string | Date;
    to: string | Date;
}, now?: Date, opts?: RangeParseOptions): TimeRange;
/** Apply Grafana timepicker.nowDelay to wall-clock "now". */
declare function applyNowDelay(now: Date, nowDelayMs?: number): Date;
/** Grafana dashboard.fiscalYearStartMonth is 0-based (0=Jan … 11=Dec). */
declare function normalizeFiscalMonth(raw: unknown): number;
/** Start of fiscal year containing `now` (local TZ). */
declare function startOfFiscalYear(now: Date, fiscalYearStartMonth?: number): Date;
/** Exclusive end (= start of next fiscal year). */
declare function endOfFiscalYear(now: Date, fiscalYearStartMonth?: number): Date;
/** Start of fiscal quarter containing `now` (3-month buckets from fiscalYearStartMonth). */
declare function startOfFiscalQuarter(now: Date, fiscalYearStartMonth?: number): Date;
/** Exclusive end of fiscal quarter (= start of next fiscal quarter). */
declare function endOfFiscalQuarter(now: Date, fiscalYearStartMonth?: number): Date;
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;
    /** When true, WithTrace records frame list after each step (editor debug). */
    includeFrameSnapshots?: boolean;
};
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[];
    /**
     * Frame list after each step (index 0 = input clone).
     * Only populated when context.includeFrameSnapshots is true (editor debug).
     */
    frameSnapshots?: DataFrame[][];
};
declare function applyTransformationsWithTrace(frames: DataFrame[], transformations?: Array<{
    id: string;
    options?: Record<string, unknown>;
    disabled?: boolean;
    filter?: unknown;
}>, context?: ApplyTransformationsContext): TransformPipelineResult;
/**
 * Fast path: one entry detach, no step snapshots / fieldNames / rowCounts.
 * Use applyTransformationsWithTrace for editor debug.
 */
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>;

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[];
}
interface CompiledOverrideRule {
    match: FieldMatcherFn;
    properties: DynamicConfigValue[];
    matcher: MatcherConfig;
}
declare function compileOverrideRules(overrides?: ConfigOverrideRule[]): CompiledOverrideRule[];
/** Test/helper: clear compile caches. */
declare function clearFieldOverrideCompileCache(): void;

/** @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[];

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[];

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;

/** One Dashboard-JSON transformation step, in user order. */
type DataTransformConfig = {
    id: string;
    options?: Record<string, unknown>;
    disabled?: boolean;
    filter?: unknown;
};
/** Field config source as stored on a dashboard panel. */
type FieldConfigSource = {
    defaults?: FieldConfig;
    overrides?: ConfigOverrideRule[];
};
/** Non-fatal pipeline diagnostic surfaced to callers. */
type PipelineWarning = {
    type?: 'transform' | 'fieldOverride' | 'dataFrame';
    transformId?: string;
    message?: string;
};
type PreparePanelDataInput = {
    frames: DataFrame[];
    transformations: DataTransformConfig[];
    fieldConfig: FieldConfigSource;
    replaceVariables: (value: string) => string;
    signal?: AbortSignal;
};
type PreparePanelDataResult = {
    frames: DataFrame[];
    warnings: PipelineWarning[];
    revision: string;
};
declare function preparePanelData(input: PreparePanelDataInput): PreparePanelDataResult;

/** 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;

/**
 * Frame revision tokens for skip-work on already-normalized DataFrames (Task 9).
 * Uses WeakMap so DataFrame JSON / round-trip stay free of implementation keys.
 */

declare function assignFrameRevision(frame: DataFrame, revision?: number): number;
declare function getFrameRevision(frame: DataFrame): number | undefined;
/** Mark frame as fully normalized at its current (or new) revision. */
declare function markFrameNormalized(frame: DataFrame, revision?: number): number;
/** True when frame was normalized at its current revision (no dirty bump). */
declare function isFrameNormalized(frame: DataFrame): boolean;
/** Invalidate normalization skip without changing object identity. */
declare function bumpFrameRevision(frame: DataFrame): number;
/**
 * Context is "already applied" when every provided ctx field is present on meta.custom
 * (or top-level preferredVisualisationType). Missing ctx → always true.
 */
declare function frameContextMatches(frame: DataFrame, ctx?: FrameNormalizationContext): boolean;
/** Skip full normalize when same revision is already normalized and ctx matches. */
declare function canSkipNormalize(frame: DataFrame, ctx?: FrameNormalizationContext): boolean;
/** Structural key for a frame set (identity + shape; not full value hash). */
declare function frameSetRevisionKey(frames: DataFrame[]): string;

/**
 * Compile + cache panel pipeline config (transforms + field overrides) by revision.
 * Byte/entry limited LRU (Task 9). Does not change transform semantics.
 */

type PipelineTransformStep = {
    id: string;
    options?: Record<string, unknown>;
    disabled?: boolean;
    filter?: unknown;
};
type PanelPipelineConfig = {
    transformations?: PipelineTransformStep[];
    fieldConfigDefaults?: FieldConfig;
    fieldConfigOverrides?: ConfigOverrideRule[];
};
type CompiledPanelPipeline = {
    /** Stable content revision of the config. */
    revision: string;
    /** Original transform list (trace path / unknown round-trip). */
    transformations: PipelineTransformStep[];
    /**
     * Fast-path steps: disabled dropped, aliases resolved, sort+limit fused,
     * default options merged. Semantics match applyTransformations.
     */
    fastSteps: PipelineTransformStep[];
    defaults: FieldConfig;
    /** Stable overrides array identity while cache entry lives. */
    overrides: ConfigOverrideRule[];
    /** Precompiled matchers (also cached inside fieldOverrides). */
    compiledOverrides: CompiledOverrideRule[];
    estimatedBytes: number;
};
/** Build fast-path steps: resolve aliases, merge defaults, fuse sort→limit. */
declare function compileTransformSteps(transformations?: PipelineTransformStep[]): PipelineTransformStep[];
/**
 * Content revision for pipeline config. Stable across equivalent plain objects.
 * Not a cryptographic hash — collision-resistant enough for cache keys.
 */
declare function pipelineConfigRevision(config: PanelPipelineConfig): string;
declare function getCompiledPipeline(config: PanelPipelineConfig): CompiledPanelPipeline;
declare function runCompiledPipeline(frames: DataFrame[], compiled: CompiledPanelPipeline, opts?: {
    withTrace?: boolean;
}): {
    frames: DataFrame[];
    steps: TransformPipelineResult['steps'];
    diagnostics: TransformDiagnostic[];
};
declare function clearCompiledPipelineCache(): void;
declare function compiledPipelineCacheStats(): {
    entries: number;
    bytes: number;
    maxEntries: number;
    maxBytes: number;
};
/** Test/ops: tighten or restore cache caps. */
declare function configureCompiledPipelineCache(opts: {
    maxEntries?: number;
    maxBytes?: number;
}): void;

/**
 * Grafana-compatible string helpers for field matchers / value mappings.
 * @see grafana-main/packages/grafana-data/src/text/string.ts
 */
declare function stringStartsAsRegEx(str: string): boolean;
/**
 * Convert a Grafana-style pattern to RegExp.
 * - bare string → anchored `^${str}$`
 * - `/pattern/flags` → RegExp(pattern, flags)
 */
declare function stringToJsRegex(str: string): RegExp;
/** Safe variant: invalid patterns return null instead of throwing. */
declare function stringToJsRegexSafe(str: unknown): RegExp | null;

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, applyNowDelay, applyProcessedProperty, applyResolvedTheme, applyTheme2CssVars, applyTransformations, applyTransformationsWithTrace, applyValueMappings, asHexString, asRgbString, assignFrameRevision, buildDataLinkUrl, buildDataLinkVars, bumpFrameRevision, canSkipNormalize, clearCompiledPipelineCache, clearFieldOverrideCompileCache, colorManipulator, compileOverrideRules, compileTransformSteps, compiledPipelineCacheStats, configureCompiledPipelineCache, continuousGrYlRd, convertV2DashboardToV1, createColors, createDataFrame, createGlobalStyles, createTheme, createThemeFromPreference, createVisualizationColors, darken, dashboardRoundTrip, dateTime, decomposeColor, defaultRefreshIntervals, detectSourceKind, diffJsonPaths, displayValueToString, emphasize, endOfFiscalQuarter, endOfFiscalYear, fieldMatchesName, findField, flattenV2Layout, formatLabels, formatSuggestionToken, formatUnit, formatValue, formatValueWithUnit, formattedValueToString, frameContextMatches, frameFingerprint, frameHasName, frameSetRevisionKey, getActiveThreshold, getAtPath, getClassicPalette, getCompiledPipeline, getContrastRatio, getContrastText, getDashboardLinkUrl, getDataFrameVars, getDataLinksVariableSuggestions, getDisplayProcessor, getFieldColor, getFieldDisplayName, getFieldLinks, getFieldMatcher, getFieldMatcherInfo, getFieldNameOptions, getFieldSeriesColor, getFrameDisplayName, getFrameFieldsDisplayNames, getFrameRevision, getInterval, getLuminance, getOverrideProcessor, getRawDisplayProcessor, getTemplateVariableSuggestions, getThresholdColor, getTransformer, getValueFormat, groupLabelForScope, hexToRgb, hslToRgb, interpolateDataLinkString, intervalToMs, isFrameNormalized, isIanaTimezone, isKnownOverrideProperty, isUtcTimezone, isV2Dashboard, lighten, listFieldMatchers, listOverridePickerMatchers, listReducerIds, listStandardTransformers, listTransformerIds, listValueFormatIds, markFrameNormalized, matchField, matchFieldWithRegistry, matchFrameFilter, migrateDashboard, migrateV1Dashboard, normalizeBaseNameMode, normalizeDashboard, normalizeDataFrames, normalizeFiscalMonth, palette, parseDashboardDocument, parsePath, pipelineConfigRevision, preProcessPanelData, preparePanelData, preserveUnknownFields, processOverrideValue, rangeUtil_parse, recomposeColor, reduceField, reduceField$1 as reduceFieldFromRegistry, registerTransformer, removeAtPath, resolveDataLink, resolveThemeMode, resolveThemeModeHint, resolveTransformerId, resolveV2Datasource, resolveVizColor, rgbToHex, runCompiledPipeline, runMigrations, setAtPath, sortThresholds, standardTransformers, startOfFiscalQuarter, startOfFiscalYear, stringStartsAsRegEx, stringToJsRegex, stringToJsRegexSafe, stringToMs, toDataFrameDTO, toSerializableDashboard, v1Migrations, v2ResourceToV1, watchSystemTheme, zonedWallTimeToUtc };
export type { AbsoluteTimeRange, AnnotationQuery, ApplyTransformationsContext, CompiledOverrideRule, CompiledPanelPipeline, ConfigOverrideRule, CreateThemeOptions, DashboardDocumentEnvelope, DashboardModel, DashboardSourceKind, DataFrame, DataLink, DataLinkVars, DataQuery, DataSourceJsonData, DataSourceSettings, DataTransformConfig, DecimalCount, DecomposeColor, DisplayProcessor, DisplayValue, DynamicConfigValue, Field, FieldCalcs, FieldConfig, FieldConfigSource, FieldMatcherFn, FieldMatcherInfo, FieldType, FrameFieldsDisplayNames, FrameFilterConfig, FrameNormalizationContext, GrafanaTheme2, GridPos, JsonPatchOp, LayoutItem, LayoutRow, LoadingState, LoadingStateValue, MatcherConfig, MatcherScope, PaletteKey, PanelData, PanelDataLike, PanelLoadingState, PanelModel, PanelPipelineConfig, PipelineTransformStep, PipelineWarning, PreparePanelDataInput, PreparePanelDataResult, RangeParseOptions, ResolveDataLinkContext, ScopedVars, ThemeColorContext, ThemeColors, ThemeColorsBase, ThemeMode, ThemeModeHint, 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;
    /** Grafana panel.cacheTimeout — forwarded to backend DS when supported. */
    cacheTimeout?: string | null;
    /** Grafana panel.queryCachingTTL (ms) — client/query cache TTL for this request. */
    queryCachingTTL?: number | null;
    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
 *
 * Grafana signature: addLegendOptions(builder, includeLegendCalcs = true, showLegend = true).
 * Vue keeps includeWidth as a 3rd arg for backward compat and adds showLegend as 4th
 * (bargauge passes (true, true, false) → legend hidden by default).
 */
declare function addLegendOptions(builder: OptionsUIBuilder, includeCalcs?: boolean, includeWidth?: boolean, showLegend?: boolean): OptionsUIBuilder<Record<string, unknown>>;

/** Matches grafana-ui/options/builder/tooltip.tsx optsWithHideZeros. */
declare const optsWithHideZeros: {
    tooltip: {
        mode: string;
        sort: string;
        hideZeros: boolean;
    };
};
/**
 * Align with grafana-ui options/builder/tooltip.tsx.
 * Signature: addTooltipOptions(builder, singleOnly=false, setProximity=false, defaultOptions?).
 * - hoverProximity only added when setProximity=true, shown when mode !== none
 * - hideZeros only added when defaultOptions?.tooltip?.hideZeros !== undefined
 * - maxHeight shown when mode===multi or annotations contain exemplars
 */
declare function addTooltipOptions(builder: OptionsUIBuilder, singleOnly?: boolean, setProximity?: boolean, defaultOptions?: {
    tooltip?: {
        mode?: string;
        sort?: string;
        hideZeros?: 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>>;

/**
 * Shared "Value options" for SingleStat-family panels (stat, gauge, bargauge, piechart).
 * Aligned with grafana-main public/app/plugins/panel/stat/common.ts addStandardDataReduceOptions.
 *
 * Registers:
 *  - reduceOptions.values   (radio: Calculate / All values)
 *  - reduceOptions.limit    (number, shown when values=true)
 *  - reduceOptions.calcs    (stats-picker, shown when values=false)
 *  - reduceOptions.fields   (field-name / regex select)
 */
declare function addStandardDataReduceOptions(builder: OptionsUIBuilder, includeFieldMatcher?: boolean): 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, addStandardDataReduceOptions, 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, optsWithHideZeros, 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;
    /** Higher runs first when concurrency is saturated. Default: visible ? 10 : 0 */
    priority?: number;
}
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;
    /** Soft cap on estimated cache payload bytes (Task 7). */
    maxCacheBytes?: number;
}
/**
 * Vue-native query scheduler (no RxJS).
 * Supports concurrency, cancel, cache, visibility skip, mixed DS fan-out.
 */
/** Per-request queryCachingTTL overrides scheduler default cacheTtlMs (Grafana panel option). */
declare function resolveRequestCacheTtlMs(request: {
    queryCachingTTL?: number | null;
}, defaultTtlMs: number): number;
declare class QueryScheduler {
    private concurrency;
    private resolveDataSource;
    private cacheTtlMs;
    private maxCacheEntries;
    private maxCacheBytes;
    private cacheBytes;
    private active;
    private inflight;
    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;
    /** Drop queued (not yet running) work — resolve as NotStarted and drain. */
    cancelQueued(): void;
    private buildCacheKey;
    private putCache;
    private evictCache;
    private enqueue;
    private execute;
}

type PriorityQueueItem<T> = {
    priority: number;
    seq: number;
    value: T;
    cancelled?: boolean;
};
/** Higher priority first; FIFO among equals via seq. */
declare class QueryPriorityQueue<T> {
    private items;
    private seq;
    get size(): number;
    enqueue(value: T, priority: number): PriorityQueueItem<T>;
    /** Mark matching queued items cancelled (O(n)); start-time skip is O(1). */
    cancelWhere(pred: (value: T) => boolean): number;
    dequeue(): T | undefined;
    clear(): void;
}

type Dict = Record<string, string>;
declare function normalizeLocale(locale: 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;
    /** Top-level keys observed on an invalid response body (names only, no values/secrets). */
    bodyKeys?: 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;

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;

type PerfMarkName = 'app-shell-painted' | 'route-skeleton-painted' | 'dashboard-document-ready' | 'dashboard-shell-painted' | 'dashboard-interactive' | 'panel-plugin-ready' | 'panel-first-data' | 'visible-panels-settled' | 'dashboard-settled';
type PerfCounterName = 'panelHost.update' | 'uplot.build' | 'uplot.setData' | 'uplot.setSize' | 'uplot.destroy' | 'query.queued' | 'query.started' | 'query.cancelled' | 'query.deduped' | 'query.cacheHit' | 'worker.transferBytes' | 'dom.rows' | 'observer.count' | 'listener.count';
type PerfDetail = {
    generation?: number | string;
    panelId?: string | number;
};
type PerfConfig = {
    enabled: boolean;
    counters: boolean;
};
declare function configurePerf(opts?: Partial<PerfConfig>): void;
declare function isPerfEnabled(): boolean;
declare function perfMark(name: PerfMarkName, detail?: PerfDetail): void;
declare function perfMeasure(name: string, startMark: PerfMarkName, endMark: PerfMarkName, detail?: PerfDetail): void;
declare function perfCount(name: PerfCounterName, delta?: number, detail?: PerfDetail): void;
declare function getPerfCounters(): Record<string, number>;
declare function getPerfRing(): {
    t: number;
    type: string;
    name: string;
    detail?: PerfDetail;
}[];
declare function resetPerf(): void;
declare function listPerfMarkNames(): PerfMarkName[];

/**
 * Performance feature flags (Task 17 release ladder).
 *
 * Stages:
 * 1. internal: flags default true in dogfood; ?perfFlag=0 disables
 * 2. default-on with rollback: same, documented rollback
 * 3. delete old path: after nightly observation
 *
 * Sources (later wins): defaults → window.__GRAFANA_VUE_PERF_FLAGS__ → ?perfFlag=
 */
type PerfFlags = {
    /** Panel DataFrame pipeline Web Worker offload */
    panelPipelineWorker: boolean;
    /** Progressive query scheduler / visible-first */
    progressiveScheduler: boolean;
    /** GSelect filter-on-demand for large option lists */
    filterOnDemandSelect: boolean;
};
/** Resolve and apply flags once at boot (or after tests reset). */
declare function initPerfFlags(overrides?: Partial<PerfFlags>): PerfFlags;
declare function getPerfFlags(): PerfFlags;
declare function setPerfFlags(next: Partial<PerfFlags>): PerfFlags;
/** Test helper */
declare function __resetPerfFlagsForTests(): void;

/**
 * Decide whether DataFrame pipeline work should run in a Worker.
 * Small payloads stay on the main thread (ADR 0004).
 */
type PipelineWorkerDecision = {
    useWorker: boolean;
    reason: 'disabled' | 'below-threshold' | 'above-threshold' | 'no-worker';
    estimatedBytes: number;
    thresholdBytes: number;
};
declare const DEFAULT_PIPELINE_WORKER_THRESHOLD_BYTES: number;
declare function estimateFrameBytes(frames: Array<{
    length?: number;
    fields?: unknown[];
}> | null | undefined): number;
declare function shouldUsePipelineWorker(input: {
    frames?: Array<{
        length?: number;
        fields?: unknown[];
    }> | null;
    estimatedBytes?: number;
    thresholdBytes?: number;
    enabled?: boolean;
}): PipelineWorkerDecision;

/**
 * Coalesce streaming partial panel updates to at most one commit per animation frame.
 * Latest partial wins; completed state always flushes immediately.
 * After dispose(), all further pushes are no-ops (prevents Streaming after Done).
 */
type StreamCommit<T> = {
    value: T;
    complete: boolean;
};
declare function createStreamCoalescer<T>(commit: (value: T) => void): {
    push: (item: StreamCommit<T>) => void;
    dispose: () => void;
};

export { DEFAULT_PIPELINE_WORKER_THRESHOLD_BYTES, DataSourceError, GrafanaAuthError, NormalizedHeaders, OFFLINE_STORAGE_KEYS, QueryPriorityQueue, QueryScheduler, RuntimeDataSourceSettingsError, THEME_STORAGE_KEY, __resetPerfFlagsForTests, applyCredentialHeaders, applyGrafanaAuthHeaders, axiosHeadersToRecord, backendRequest, backendSrv, clearDatasourceHttpLog, clearQueryInspectorStore, clearRuntimeCredentials, clearRuntimeDataSourceSettings, configureBackendSrv, configureDatasourceHttpClient, configurePerf, configureQueryInspectorStore, configureRuntimeCredentials, configureRuntimeDataSourceSettings, createDataSourceCatalog, createDefaultBootData, createHttpClient, createStreamCoalescer, datasourceHttp, estimateFrameBytes, getAppHttp, getBackendHttp, getBackendMode, getBootData, getDataSourceByUid, getDataSourceCatalog, getDatasourceHttpClient, getDatasourceHttpLog, getEffectiveDefaultDataSource, getGrafanaAuthSnapshot, getGrafanaAuthToken, getGrafanaBaseUrl, getLiveDashboardBuilders, getPerfCounters, getPerfFlags, getPerfRing, getQueryInspectorEntry, getQueryInspectorStats, getResourceHttp, getRuntimeCredential, getRuntimeDataSourceSettings, hasPermission, initPerfFlags, initTheme, isDataSourceError, isFeatureEnabled, isGrafanaLiveConfigured, isPerfEnabled, listDataSources, listPerfMarkNames, listQueryInspectorEntries, listRuntimeDataSourceSettings, makeInspectorKey, mergeDataSourceSettings, normalizeDataSourceType, normalizeLocale, onThemeChange, perfCount, perfMark, perfMeasure, putQueryInspectorEntry, readUrlTheme, redactToken, registerI18nCatalog, registerLiveDashboardBuilders, requireGrafanaAuthToken, resetDataSourceCatalog, resetHttpClients, resetOfflineStorage, resetPerf, resolveInitialPreference, resolveRequestCacheTtlMs, sanitizeErrorText, saveDataSource, setBootData, setGrafanaAuthToken, setLocale, setPerfFlags, setRTL, setRuntimeCredential, shouldUsePipelineWorker, 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, PerfCounterName, PerfDetail, PerfFlags, PerfMarkName, PipelineWorkerDecision, QueryRequest, QuerySchedulerOptions, RuntimeCredential, RuntimeCredentialProvider, StreamChunk, StreamCommit, 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$I = {
    variant?: 'primary' | 'secondary' | 'destructive' | 'text' | 'toolbar' | 'canvas';
    size?: 'sm' | 'md' | 'lg';
    disabled?: boolean;
    loading?: boolean;
    htmlType?: 'button' | 'submit' | 'reset';
    testId?: string;
};
declare var __VLS_8$1: {};
type __VLS_Slots$i = {} & {
    default?: (props: typeof __VLS_8$1) => any;
};
declare const __VLS_base$i: vue.DefineComponent<__VLS_Props$I, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$I> & Readonly<{}>, {
    variant: "primary" | "secondary" | "destructive" | "text" | "toolbar" | "canvas";
    size: "sm" | "md" | "lg";
    htmlType: "button" | "submit" | "reset";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$K: __VLS_WithSlots$i<typeof __VLS_base$i, __VLS_Slots$i>;
declare const _default$K: typeof __VLS_export$K;

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

type __VLS_Props$H = {
    open: boolean;
    title?: string;
    width?: number | string;
    confirmLoading?: boolean;
    okText?: string;
    cancelText?: string;
    /** Grafana Modal primary action — destructive maps to error solid. */
    okVariant?: 'primary' | 'destructive';
    hideFooter?: boolean;
    testId?: string;
};
declare var __VLS_28: {};
type __VLS_Slots$h = {} & {
    default?: (props: typeof __VLS_28) => any;
};
declare const __VLS_base$h: vue.DefineComponent<__VLS_Props$H, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
    ok: () => any;
    cancel: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$H> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
    onOk?: (() => any) | undefined;
    onCancel?: (() => any) | undefined;
}>, {
    width: number | string;
    okText: string;
    cancelText: string;
    okVariant: "primary" | "destructive";
    hideFooter: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$J: __VLS_WithSlots$h<typeof __VLS_base$h, __VLS_Slots$h>;
declare const _default$J: typeof __VLS_export$J;

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

type GSelectOption = {
    label: string;
    value?: string | number;
    disabled?: boolean;
    options?: GSelectOption[];
};

type __VLS_Props$G = {
    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;
    /**
     * When true (or when options.length >= filterOnDemandThreshold), search is client-side
     * but only a bounded window of options is passed to Ant Select.
     * Parent can also listen to `search` for server-side filtering.
     */
    filterOnDemand?: boolean;
    /** Option count that auto-enables filter-on-demand. Default 200. */
    filterOnDemandThreshold?: number;
    /** Max options rendered into the dropdown at once. Default 100. */
    maxVisibleOptions?: number;
    /**
     * Fixed width (e.g. "300px", "24em"). When omitted, the select fills its
     * container (100%) — the pre-existing default, unchanged for callers that
     * don't pass this.
     */
    width?: string | number;
};
declare const __VLS_export$I: vue.DefineComponent<__VLS_Props$G, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:value": (args_0: unknown) => any;
    change: (args_0: unknown) => any;
    search: (args_0: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$G> & Readonly<{
    "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
    onChange?: ((args_0: unknown) => any) | undefined;
    onSearch?: ((args_0: string) => any) | undefined;
}>, {
    size: "small" | "middle" | "large";
    showSearch: boolean;
    virtual: boolean;
    filterOnDemand: boolean;
    filterOnDemandThreshold: number;
    maxVisibleOptions: number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$I: typeof __VLS_export$I;

type __VLS_Props$F = {
    layout?: 'horizontal' | 'vertical' | 'inline';
    model?: Record<string, unknown>;
    testId?: string;
};
declare var __VLS_11$2: {};
type __VLS_Slots$g = {} & {
    default?: (props: typeof __VLS_11$2) => any;
};
declare const __VLS_base$g: vue.DefineComponent<__VLS_Props$F, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    finish: (args_0: Record<string, unknown>) => any;
    finishFailed: (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$F> & Readonly<{
    onFinish?: ((args_0: Record<string, unknown>) => any) | undefined;
    onFinishFailed?: ((args_0: unknown) => any) | undefined;
}>, {}, {}, {}, {}, 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 = {
    name: string;
    size?: number | string;
    color?: string;
    title?: string;
    spin?: boolean;
    strict?: boolean;
};
declare const __VLS_export$G: vue.DefineComponent<__VLS_Props$E, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$E> & Readonly<{}>, {
    strict: boolean;
    size: number | string;
    spin: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$G: typeof __VLS_export$G;

type __VLS_Props$D = {
    value?: string | number;
    modelValue?: string | number;
    placeholder?: string;
    type?: 'text' | 'number' | 'password' | 'email' | 'url' | 'search' | 'time' | 'date';
    disabled?: boolean;
    testId?: string;
    /** Render a multi-line textarea (Ant Input.TextArea). */
    textarea?: boolean;
    rows?: number;
};
declare const __VLS_export$F: vue.DefineComponent<__VLS_Props$D, {}, {}, {}, {}, 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$D> & 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$F: typeof __VLS_export$F;

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

type __VLS_Props$B = {
    value?: number;
    min?: number;
    max?: number;
    step?: number;
};
declare const __VLS_export$D: vue.DefineComponent<__VLS_Props$B, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:value": (args_0: number) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$B> & Readonly<{
    "onUpdate:value"?: ((args_0: number) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$D: typeof __VLS_export$D;

type __VLS_Props$A = {
    value?: unknown;
    presets?: unknown;
    format?: string;
    showTime?: boolean;
    allowClear?: boolean;
    size?: 'small' | 'middle' | 'large';
};
declare const __VLS_export$C: vue.DefineComponent<__VLS_Props$A, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:value": (args_0: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$A> & Readonly<{
    "onUpdate:value"?: ((args_0: unknown) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$C: typeof __VLS_export$C;

type __VLS_Props$z = {
    checked?: boolean;
    disabled?: boolean;
    testId?: string;
};
declare var __VLS_10$2: {};
type __VLS_Slots$f = {} & {
    default?: (props: typeof __VLS_10$2) => any;
};
declare const __VLS_base$f: 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 __VLS_export$B: __VLS_WithSlots$f<typeof __VLS_base$f, __VLS_Slots$f>;
declare const _default$B: typeof __VLS_export$B;

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

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

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

type __VLS_Props$x = {
    open?: boolean;
    title?: string;
    /** CSS width — Grafana md ≈ 50vw / min 568px */
    width?: number | string;
    /** sm | md | lg maps to Grafana drawerSizes */
    size?: 'sm' | 'md' | 'lg';
    testId?: string;
    destroyOnClose?: boolean;
    /** Allow left-edge drag resize (Grafana default true) */
    resizable?: boolean;
};
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$x, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$x> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {
    size: "sm" | "md" | "lg";
    width: number | string;
    destroyOnClose: boolean;
    resizable: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$z: __VLS_WithSlots$d<typeof __VLS_base$d, __VLS_Slots$d>;
declare const _default$z: typeof __VLS_export$z;

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

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

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

type RowRecord = Record<string, unknown>;
type __VLS_Props$v = {
    columns: Array<Record<string, unknown>>;
    /** Full or non-virtual rows. Ignored for body rows when getRow is provided. */
    dataSource?: RowRecord[];
    loading?: boolean;
    testId?: string;
    pagination?: boolean | Record<string, unknown>;
    size?: 'small' | 'middle' | 'large';
    bordered?: boolean;
    showHeader?: boolean;
    scroll?: {
        x?: string | number | true;
        y?: string | number;
    };
    rowClassName?: string | ((record: RowRecord, index: number) => string);
    customRow?: (record: RowRecord, index?: number) => Record<string, unknown>;
    /** Enable fixed-height windowed rendering. */
    virtual?: boolean;
    /** Fixed row height in px (dynamic heights unsupported — use ellipsis). */
    rowHeight?: number;
    /** Logical row count when using getRow. Defaults to dataSource.length. */
    rowCount?: number;
    /** Lazy row factory: index is into the full logical list (0..rowCount). */
    getRow?: (index: number) => RowRecord;
    /**
     * Reactive dependency the parent should pass (e.g. rowIndices / frame)
     * so window re-materializes when sort/filter/data changes.
     */
    rowsDep?: unknown;
    rowKey?: string | ((record: RowRecord) => string);
    /** ant-design-vue Table expandable config (nested rows / ExpandedRow). */
    expandable?: Record<string, unknown> | null;
};
declare var __VLS_10: {};
type __VLS_Slots$b = {} & {
    footer?: (props: typeof __VLS_10) => any;
};
declare const __VLS_base$b: vue.DefineComponent<__VLS_Props$v, {
    /** Test / debug helpers */
    getVisibleRange: () => __.GTableVisibleRange;
    getScrollTop: () => number;
    setScrollTop: (v: number) => void;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (pagination: TablePaginationConfig, filters: Record<string, unknown>, sorter: unknown, extra: unknown) => any;
    scroll: (payload: {
        scrollTop: number;
        clientHeight: number;
    }) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$v> & Readonly<{
    onChange?: ((pagination: TablePaginationConfig, filters: Record<string, unknown>, sorter: unknown, extra: unknown) => any) | undefined;
    onScroll?: ((payload: {
        scrollTop: number;
        clientHeight: number;
    }) => any) | undefined;
}>, {
    size: "small" | "middle" | "large";
    virtual: boolean;
    bordered: boolean;
    dataSource: RowRecord[];
    showHeader: boolean;
    rowHeight: number;
    rowKey: string | ((record: RowRecord) => string);
    expandable: Record<string, unknown> | null;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$x: __VLS_WithSlots$b<typeof __VLS_base$b, __VLS_Slots$b>;
declare const _default$x: typeof __VLS_export$x;

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

/**
 * Fixed-height table virtualization window.
 * Shared by GTable; panels may keep richer VariableSizeList helpers separately.
 */
declare const GTABLE_VIRT: {
    readonly OVERSCAN: 8;
    readonly DEFAULT_ROW_HEIGHT: 36;
};
interface GTableVisibleRange {
    start: number;
    end: number;
    offsetY: number;
    bottomSpacer: number;
    totalHeight: number;
    windowCount: number;
}
declare function computeTableVisibleRange(scrollTop: number, viewportHeight: number, rowHeight: number, itemCount: number, overscan?: number): GTableVisibleRange;

type __VLS_Props$u = {
    modelValue?: string;
    placeholder?: string;
    readOnly?: boolean;
    disabled?: boolean;
    /** When true, Enter emits run (reference LogQuerySearch). */
    runOnEnter?: boolean;
    /** Optional async/sync completion source. */
    completionSource?: (context: CompletionContext) => CompletionResult | null | Promise<CompletionResult | null>;
    testId?: string;
    invalid?: boolean;
    /**
     * Optional chip matcher. When a match is valid (validator optional),
     * the matched span gets class `gqe-chip` for aggregation-style chips.
     */
    chipPattern?: RegExp | null;
    /** Return true to decorate the match (default: all matches). */
    chipValidate?: ((matched: string, groups: string[]) => boolean) | null;
    /** Parent wrap owns border/background (Argus LQS/QAE). */
    embedded?: boolean;
    /** CM font size in px (Argus agg uses 13). */
    fontSize?: number;
    /** Accessible name for the contenteditable surface. */
    ariaLabel?: string;
};
declare const __VLS_export$w: vue.DefineComponent<__VLS_Props$u, {
    focus: () => void | undefined;
    getView: () => EditorView | null;
    startCompletion: () => boolean | null;
    closeCompletion: () => boolean | null;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (args_0: string) => any;
    focus: () => any;
    "update:modelValue": (args_0: string) => any;
    blur: () => any;
    run: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$u> & Readonly<{
    onChange?: ((args_0: string) => any) | undefined;
    onFocus?: (() => any) | undefined;
    "onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
    onBlur?: (() => any) | undefined;
    onRun?: (() => any) | undefined;
}>, {
    readOnly: boolean;
    fontSize: number;
    disabled: boolean;
    placeholder: string;
    ariaLabel: string;
    modelValue: string;
    invalid: boolean;
    runOnEnter: boolean;
    chipPattern: RegExp | null;
    chipValidate: ((matched: string, groups: string[]) => boolean) | null;
    embedded: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$w: typeof __VLS_export$w;

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

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

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

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

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$p = {
    modelValue?: ValueMapping[] | null;
};
declare const __VLS_export$r: vue.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: ValueMapping[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{
    "onUpdate:modelValue"?: ((args_0: ValueMapping[]) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$r: typeof __VLS_export$r;

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

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$n = {
    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$p: vue.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:modelValue": (args_0: string | undefined) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$n> & 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$p: typeof __VLS_export$p;

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

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

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

/** 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$i = {
    width: number;
    height: number;
    legendPlacement?: 'bottom' | 'right';
    legendMaxHeight?: string;
    legendMaxWidth?: string;
    legendWidth?: number | string;
};
declare var __VLS_1$7: {
    width: number;
    height: number;
};
declare var __VLS_3$1: {};
type __VLS_Slots$a = {} & {
    default?: (props: typeof __VLS_1$7) => any;
} & {
    legend?: (props: typeof __VLS_3$1) => any;
};
declare const __VLS_base$a: vue.DefineComponent<__VLS_Props$i, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{}>, {
    legendPlacement: "bottom" | "right";
    legendMaxHeight: string;
    legendMaxWidth: string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$k: __VLS_WithSlots$a<typeof __VLS_base$a, __VLS_Slots$a>;
declare const _default$k: typeof __VLS_export$k;

type __VLS_WithSlots$a<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$h = {
    value?: Partial<PanelContext>;
};
declare var __VLS_1$6: {};
type __VLS_Slots$9 = {} & {
    default?: (props: typeof __VLS_1$6) => any;
};
declare const __VLS_base$9: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {}, {}, {}, {}, 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;
    };
};

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

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$g = {
    items: VizLegendItem[];
    placement?: VizLegendPlacement;
    displayMode?: VizLegendDisplayMode;
    readonly?: boolean;
};
declare const __VLS_export$h: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, 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$g> & 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;
}>, {
    readonly: boolean;
    placement: VizLegendPlacement;
    displayMode: VizLegendDisplayMode;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$h: typeof __VLS_export$h;

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

type __VLS_Props$f = {
    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$g: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{}>, {
    mode: VizTooltipMode;
    visible: boolean;
    items: VizTooltipItem[];
    y: number;
    x: number;
    floating: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$g: typeof __VLS_export$g;

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

type __VLS_Props$d = {
    label?: string;
    labelWidth?: number;
    tooltip?: string;
    grow?: boolean;
    disabled?: boolean;
    required?: boolean;
};
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$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{}>, {
    labelWidth: number;
    grow: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$e: __VLS_WithSlots$8<typeof __VLS_base$8, __VLS_Slots$8>;
declare const _default$e: typeof __VLS_export$e;

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

declare var __VLS_1$4: {};
type __VLS_Slots$7 = {} & {
    default?: (props: typeof __VLS_1$4) => any;
};
declare const __VLS_base$7: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, 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;
    };
};

type __VLS_Props$c = {
    text?: string;
    color?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
    icon?: string;
};
declare var __VLS_1$3: {};
type __VLS_Slots$6 = {} & {
    default?: (props: typeof __VLS_1$3) => any;
};
declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{}>, {
    color: "default" | "primary" | "success" | "warning" | "error" | "info";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, 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 = {
    name?: string;
    color?: string;
    closable?: boolean;
};
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, {
    click: () => any;
    remove: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{
    onClick?: (() => any) | undefined;
    onRemove?: (() => any) | undefined;
}>, {}, {}, {}, {}, 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 = {
    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$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    close: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
    onClose?: (() => any) | undefined;
}>, {
    closable: boolean;
    severity: "info" | "success" | "warning" | "error";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$a: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
declare const _default$a: typeof __VLS_export$a;

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

type __VLS_Props$9 = {
    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$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$9: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
declare const _default$9: typeof __VLS_export$9;

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

type __VLS_Props$8 = {
    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$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (v: boolean) => any;
    cancel: () => any;
    confirm: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$8> & 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$8: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
declare const _default$8: typeof __VLS_export$8;

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

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

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

type __VLS_Props$5 = {
    current?: number;
    pageSize?: number;
    total?: number;
    showSizeChanger?: boolean;
};
declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, 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$5> & 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$5: typeof __VLS_export$5;

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

type __VLS_Props$3 = {
    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$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{}>, {
    placement: "top" | "bottom" | "left" | "right";
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$3: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
declare const _default$3: typeof __VLS_export$3;

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

type __VLS_Props$2 = {
    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$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & 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$2: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default$2: typeof __VLS_export$2;

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

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

type __VLS_Props = {
    width?: string | number;
    height?: string | number;
    radius?: string | number;
    block?: boolean;
};
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
    height: string | number;
    block: boolean;
    width: string | number;
    radius: string | number;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;

export { _default$l as ActionsEditor, _default$i as BigValue, BigValueColorMode, BigValueGraphMode, BigValueJustifyMode, BigValueTextMode, _default$u as ColorPicker, _default$q as DataLinksEditor, _default$t as FieldColorEditor, _default$p as FieldNamePicker, _default$a as GAlert, _default$c as GBadge, _default$K as GButton, _default$9 as GCard, _default$B as GCheckbox, _default$8 as GConfirmModal, _default$1 as GDatePicker, _default$z as GDrawer, _default$H as GForm, _default$G as GIcon, _default$e as GInlineField, _default$d as GInlineFieldRow, _default$F as GInput, _default$6 as GLoadingPlaceholder, _default$J as GModal, _default$5 as GPagination, _default$2 as GPopover, _default$w as GQueryExpressionEditor, _default$f as GRadioButtonGroup, _default$C as GRangePicker, _default$4 as GSegmentInput, _default$I as GSelect, _default as GSkeleton, _default$D as GSlider, _default$7 as GSpinner, _default$E as GSwitch, GTABLE_VIRT, _default$x as GTable, _default$A as GTabs, _default$b as GTag, _default$3 as GToggletip, _default$y as GTooltip, _default$j as PanelContextProvider, _default$o as StatsPicker, _default$n as StringArrayEditor, _default$s as ThresholdsEditor, _default$m as TimezonePicker, UNIT_CATEGORIES, _default$v as UnitPicker, _default$r as ValueMappingsEditor, _default$k as VizLayout, _default$h as VizLegend, _default$g as VizTooltip, antDesignThemeTokens, applyTextDirection, applyThemeVars, calculateFontSize, computeBigValueLayout, computeTableVisibleRange, 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, GTableVisibleRange, 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>;

type __VLS_Props$3 = {
    title?: string;
    /** Panel description — shown via info icon in header (M4.1) */
    description?: string;
    /**
     * Grafana PanelTimeRange.timeInfo badge (timeFrom / timeShift).
     * Hidden when empty or hideTimeOverride already applied upstream.
     */
    timeInfo?: string;
    /**
     * Resolved panel.links for chrome title items (Grafana VizPanelLinks).
     * Host resolves variables/time; chrome only renders.
     */
    links?: Array<{
        title: string;
        href: string;
        targetBlank?: boolean;
    }>;
    loading?: boolean;
    /** When true with loading, keep rendering content and show a small spinner. */
    hasStaleData?: boolean;
    error?: string;
    transparent?: boolean;
    width?: number;
    height?: number;
    panelType?: string;
    /**
     * Dashboard layout edit mode (Grafana state.isEditing).
     * Enables Duplicate / Remove / library create and selection-related actions.
     */
    editable?: boolean;
    /**
     * Whether user may open panel Edit (Grafana canEditDashboard && dashboard.editable).
     * Shown even when not currently in layout edit mode — Edit will enter edit mode.
     */
    canEdit?: boolean;
    noData?: boolean;
    noDataText?: string;
    /** When true, show Unlink library panel (Grafana More → Unlink) */
    isLibraryPanel?: boolean;
    /**
     * Panel editor preview / options chrome (Grafana panel isEditing).
     * Hides View / Fullscreen — not meaningful inside the editor.
     */
    isEditing?: boolean;
    /** Dashboard is currently viewing this panel full-canvas (?viewPanel=). */
    isViewing?: boolean;
};
/** Grafana shareDashboardType subset: link | embed | snapshot */
type PanelShareView = 'link' | 'embed' | 'snapshot';
declare var __VLS_1: {};
declare var __VLS_194: {};
type __VLS_Slots = {} & {
    default?: (props: typeof __VLS_1) => any;
} & {
    default?: (props: typeof __VLS_194) => any;
};
declare const __VLS_base: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    view: () => any;
    help: () => any;
    copy: () => any;
    inspect: (tab?: string | undefined) => any;
    fullscreen: () => any;
    edit: () => any;
    duplicate: () => any;
    remove: () => any;
    share: (mode?: PanelShareView | undefined) => any;
    explore: () => any;
    toggleLegend: () => any;
    copyStyles: () => any;
    pasteStyles: () => any;
    timeSettings: () => any;
    libraryPanel: () => any;
    unlinkLibrary: () => any;
    alertRule: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
    onView?: (() => any) | undefined;
    onHelp?: (() => any) | undefined;
    onCopy?: (() => any) | undefined;
    onInspect?: ((tab?: string | undefined) => any) | undefined;
    onFullscreen?: (() => any) | undefined;
    onEdit?: (() => any) | undefined;
    onDuplicate?: (() => any) | undefined;
    onRemove?: (() => any) | undefined;
    onShare?: ((mode?: PanelShareView | undefined) => any) | undefined;
    onExplore?: (() => any) | undefined;
    onToggleLegend?: (() => any) | undefined;
    onCopyStyles?: (() => any) | undefined;
    onPasteStyles?: (() => any) | undefined;
    onTimeSettings?: (() => any) | undefined;
    onLibraryPanel?: (() => any) | undefined;
    onUnlinkLibrary?: (() => any) | undefined;
    onAlertRule?: (() => any) | undefined;
}>, {
    editable: boolean;
    canEdit: boolean;
    isEditing: boolean;
    isViewing: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$3: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default$3: typeof __VLS_export$3;

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

type __VLS_Props$2 = {
    options?: Record<string, unknown>;
    metricValue?: string | number | null;
    editable?: boolean;
    width?: number;
    height?: number;
};
declare const __VLS_export$2: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (args_0: Record<string, unknown>) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
    onChange?: ((args_0: Record<string, unknown>) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$2: typeof __VLS_export$2;

type XYSeriesConfig = {
    name?: {
        fixed?: string;
    } | string;
    frame?: {
        matcher?: {
            id: string;
            options?: unknown;
        };
    };
    x?: {
        matcher?: {
            id: string;
            options?: unknown;
        };
    } | string;
    y?: {
        matcher?: {
            id: string;
            options?: unknown;
        };
    } | string;
    color?: {
        matcher?: {
            id: string;
            options?: unknown;
        };
        fixed?: string;
    };
    size?: {
        matcher?: {
            id: string;
            options?: unknown;
        };
    };
    pointColor?: string;
};
type __VLS_Props$1 = {
    mapping?: string;
    series?: XYSeriesConfig[] | string;
    dims?: {
        frame?: number;
        x?: string;
        y?: string;
    };
    frames?: DataFrame[];
};
declare const __VLS_export$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    change: (patch: {
        series?: XYSeriesConfig[];
        dims?: {
            frame?: number;
            x?: string;
            y?: string;
        };
        mapping?: string;
    }) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
    onChange?: ((patch: {
        series?: XYSeriesConfig[];
        dims?: {
            frame?: number;
            x?: string;
            y?: string;
        };
        mapping?: string;
    }) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$1: typeof __VLS_export$1;

type __VLS_Props = {
    options: Record<string, unknown>;
    onChange: (options: Record<string, unknown>) => void;
};
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;

export { _default$2 as CanvasEditor, _default as GeomapLayersEditor, PANEL_IDS, _default$3 as PanelChrome, _default$1 as XYSeriesEditor, 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];

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;
        /** Grafana panel.cacheTimeout — forward on live /api/ds/query wire */
        cacheTimeout?: string | null;
    }, 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 */
/**
 * Grafana Prometheus step:
 * - base from range / maxDataPoints
 * - floor by minInterval (DS scrape / query Min step / panel interval)
 * - multiply by intervalFactor (legacy Resolution 1/1..1/10)
 * - align to nice Prometheus intervals
 */
declare function computeStepMs(opts: {
    rangeMs: number;
    maxDataPoints?: number;
    minIntervalMs?: number;
    step?: number | string;
    intervalMs?: number;
    /** Legacy query.intervalFactor — multiplies calculated step (default 1). */
    intervalFactor?: 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;
    /** Grafana query.format — time_series | table | heatmap */
    format?: 'time_series' | 'table' | 'heatmap' | string;
}): DataFrame[];

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

declare function createPrometheusDataSource(instance: DataSourceInstanceSettings, meta: DataSourcePluginMeta): {
    uid: string;
    type: string;
    name: string;
    capabilities: DataSourceCapabilities;
    query(request: {
        requestId: string;
        targets: DataQuery[];
        range: TimeRange;
        maxDataPoints?: number;
        intervalMs?: number;
        scopedVars?: Record<string, unknown>;
        /** Grafana panel.cacheTimeout — forwarded on wire for cache-aware proxies / dual-run */
        cacheTimeout?: string | null;
    }, signal?: AbortSignal): Promise<{
        data: DataFrame[];
    }>;
    testDatasource(signal?: AbortSignal): Promise<{
        status: string;
        message: string;
    }>;
    metricFindQuery(query: unknown, signal?: AbortSignal): Promise<{
        text: string;
        value: string;
    }[]>;
    /** Prefetch helpers for QueryEditor metric browser */
    listMetricNames(signal?: AbortSignal): Promise<string[]>;
    listLabelNames(signal?: AbortSignal): Promise<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 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;

interface AssertLiveFramesOptions {
    frames: DataFrame[];
    datasourceUid: string;
    requiredFields?: string[];
    requiredBusinessKey?: string;
    minRows?: number;
}
declare class LiveAcceptanceError extends Error {
    readonly code: string;
    constructor(message: string, code: string);
}
/**
 * Assert that query frames are real live business data — never empty, offline,
 * TestData, random_walk, raw fallback, or error frames.
 */
declare function assertLiveFrames(opts: AssertLiveFramesOptions): void;

export { DATASOURCE_IDS, DS_TYPE_LABELS, LiveAcceptanceError, assertLiveFrames, 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 { AssertLiveFramesOptions, AzureMonitorQuery, BuiltinDataSourceId, BuiltinDatasourceCatalogEntry, BuiltinDatasourceCategory, CloudWatchQuery, ElasticsearchQuery, GraphiteQuery, InfluxQuery, JaegerQuery, LokiQuery, PrometheusQuery, PromqlAstParseResult, PromqlDiagnostic, PromqlDiagnosticSeverity, PromqlRange, PyroscopeQuery, QueryFieldFamily, SqlQuery, TempoQuery, TestDataQuery };

// ----- @grafana/dashboard -----
type DashboardDocument$1 = DashboardModel;
declare function createEmptyDashboardJson(title?: string): Record<string, unknown>;
declare function loadDashboardDocument(raw: Record<string, unknown>): DashboardDocument$1;
declare function serializeDashboardDocument(doc: DashboardDocument$1): string;
declare function roundTripDashboard(raw: Record<string, unknown>): DashboardDocument$1;
declare function upsertPanel(doc: DashboardDocument$1, panel: PanelModel): DashboardDocument$1;
declare function removePanel(doc: DashboardDocument$1, panelId: number): DashboardDocument$1;
declare function nextPanelId(doc: DashboardDocument$1): number;

/** Minimal Dashboard v2 kind adapter (contract-ready subset). */
interface DashboardV2 {
    kind: 'Dashboard';
    apiVersion: string;
    metadata: {
        name: string;
        uid?: string;
    };
    spec: {
        title: string;
        timeSettings?: {
            from?: string;
            to?: string;
            timezone?: string;
        };
        elements?: Record<string, unknown>;
        layout?: {
            kind: string;
            spec: unknown;
        };
        variables?: unknown[];
        annotations?: unknown[];
    };
}
declare function v1ToV2(doc: DashboardModel): DashboardV2;
declare function v2ToV1(doc: DashboardV2): DashboardModel;

declare function extractVariableRefs(text: string): string[];
declare function buildVariableDependencyGraph(variables: VariableModel[]): Map<string, string[]>;
declare function detectVariableCycles(variables: VariableModel[]): string[][];
/** Topological refresh order; throws if cycle. */
declare function variableRefreshOrder(variables: VariableModel[]): string[];
declare function encodeVariablesToUrl(variables: VariableModel[], params?: URLSearchParams): URLSearchParams;
declare function applyVariablesFromUrl(variables: VariableModel[], params: URLSearchParams): VariableModel[];

declare function buildScopedVars(variables: VariableModel[]): ScopedVars;
declare function replaceVariables(template: string, scopedVars: ScopedVars): string;
declare function formatVariableValue(value: string | string[], format?: string): string;
declare function resolveIntervalVariable(name: string, rangeMs: number): string;
declare function setVariableValue(variables: VariableModel[], name: string, value: string | string[], text?: string | string[]): VariableModel[];
/** Resolve custom / constant / query variable options. */
declare function refreshVariableOptions(variable: VariableModel, resolveDs: (ref?: {
    type?: string;
    uid?: string;
}) => DataSourceApi | undefined, scopedVars?: ScopedVars, range?: _grafana_data.TimeRange): Promise<VariableModel>;
type VariableRefreshTrigger = 'load' | 'time' | 'manual';
declare function refreshAllVariables(variables: VariableModel[], resolveDs: (ref?: {
    type?: string;
    uid?: string;
}) => DataSourceApi | undefined, opts?: {
    signal?: AbortSignal;
    trigger?: VariableRefreshTrigger;
    range?: _grafana_data.TimeRange;
}): Promise<VariableModel[]>;

type AdHocFilter = {
    key: string;
    operator: string;
    value: string;
    condition?: string;
};
/** Collect adhoc filters from dashboard variables (Grafana ad-hoc filter variables). */
declare function collectAdhocFilters(variables: VariableModel[]): AdHocFilter[];
/**
 * Apply adhoc label filters to PromQL / LogQL-like expr (Grafana datasource behavior subset).
 * Example: up + [{key:job, op:=, value:api}] → up{job="api"} or up{existing,job="api"}
 */
declare function applyAdhocFiltersToExpr(expr: string, filters: AdHocFilter[]): string;
/** Interpolate query strings then apply adhoc filters to expr/expression where applicable. */
declare function interpolateWithAdhoc(query: Record<string, unknown>, replace: (s: string) => string, filters: AdHocFilter[]): Record<string, unknown>;

interface GridLayoutItem {
    i: string;
    x: number;
    y: number;
    w: number;
    h: number;
    static?: boolean;
    panelId: number;
    isRow?: boolean;
}
declare function isRowPanel(panel: PanelModel): boolean;
/** Expand repeating panels for a single variable value set. */
declare function expandRepeats(panels: PanelModel[], repeatValues?: Record<string, string[]>): PanelModel[];
declare function panelsToLayout(panels: PanelModel[], collapsedRowIds?: Set<number>): GridLayoutItem[];
declare function layoutToGridPos(item: Pick<GridLayoutItem, 'x' | 'y' | 'w' | 'h'>): GridPos;
declare function applyLayoutToPanels(panels: PanelModel[], layout: GridLayoutItem[]): PanelModel[];
declare function collides(a: GridPos, b: GridPos): boolean;
declare function findOpenPosition(panels: PanelModel[], size: {
    w: number;
    h: number;
}): GridPos;

/** Grafana shareDashboardType panel share views we support in ShareDrawer. */
type ShareView = 'link' | 'embed' | 'snapshot';
interface ShareOptions {
    uid: string;
    slug?: string;
    orgId?: number;
    from?: string;
    to?: string;
    theme?: 'light' | 'dark' | 'current';
    panelId?: number;
    solo?: boolean;
    kiosk?: boolean | 'tv';
    appSubUrl?: string;
    variables?: Record<string, string | string[]>;
}
declare function buildShareUrl(opts: ShareOptions): string;
declare function buildEmbedHtml(opts: ShareOptions & {
    width?: number;
    height?: number;
}): string;
declare function buildPublicDashboardPath(accessToken: string): string;
declare function buildSnapshotExport(dashboard: Record<string, unknown>, meta?: {
    name?: string;
    expires?: number;
}): {
    dashboard: Record<string, unknown>;
    name: string;
    expires: number;
    external: boolean;
    key: string;
};
declare function buildDashboardJsonExport(dashboard: Record<string, unknown>): string;
/** postMessage protocol for parent embedding apps — always specify targetOrigin */
declare function notifyParentDashboardReady(targetOrigin: string, payload: {
    uid: string;
}): void;

interface InspectorSnapshot {
    panelId: number;
    title?: string;
    type?: string;
    queryCount: number;
    frameCount: number;
    state: string;
    error?: string;
    requestId?: string;
    fieldNames: string[];
    stats: {
        seriesCount: number;
        rowCounts: number[];
        fieldTypes: Record<string, number>;
    };
    queries: Array<{
        refId?: string;
        datasource?: unknown;
        hide?: boolean;
    }>;
    rawOptions: Record<string, unknown>;
    rawFieldConfig: unknown;
    /** Sanitized request summary (no secrets) */
    requestSummary?: {
        requestId?: string;
        targetCount: number;
        refIds: string[];
        hasDatasourceUid: boolean;
    };
    transformSteps?: PanelData['transformSteps'];
    seriesBeforeTransformCount?: number;
}
declare function redactSecrets(value: unknown): unknown;
declare function buildInspectorSnapshot(panel: PanelModel, data?: PanelData): InspectorSnapshot;

interface FullInspectorView {
    snapshot: InspectorSnapshot;
    request: unknown;
    response: unknown;
    warnings: string[];
    capability: Record<string, unknown>;
    /** full frames — no row/char truncation */
    frames: Array<{
        name?: string;
        refId?: string;
        length: number;
        fields: Array<{
            name: string;
            type?: string;
            values: unknown[];
        }>;
        meta?: unknown;
    }>;
}
/** Build complete inspector payload from panel data + optional responseRef envelope. */
declare function buildFullInspectorView(args: {
    panel: PanelModel;
    data?: PanelData;
    responseRef?: unknown;
    capability?: Record<string, unknown>;
}): FullInspectorView;
declare function exportInspectorJson(view: FullInspectorView): string;
declare function exportInspectorCsv(view: FullInspectorView): string;

interface AnnotationEvent {
    time: number;
    timeEnd?: number;
    title: string;
    text?: string;
    tags?: string[];
    color?: string;
}
declare function runAnnotationQueries(queries: AnnotationQuery[], range: TimeRange, resolve: (ref?: {
    type?: string;
    uid?: string;
}) => DataSourceApi | undefined): Promise<AnnotationEvent[]>;
declare function emptyAnnotationFrame(name?: string): _grafana_data.DataFrame;

interface PanelEditorState {
    panel: PanelModel;
    tab: 'query' | 'transform' | 'alert' | 'options';
}
declare function createPanelEditorState(panel: PanelModel): PanelEditorState;
declare function applyPanelTypeChange(panel: PanelModel, type: string): PanelModel;
declare function listVisualizationOptions(): Array<{
    id: string;
    name: string;
}>;
declare function updatePanelOption(panel: PanelModel, key: string, value: unknown): PanelModel;
declare function updatePanelFieldConfig(panel: PanelModel, defaults: Record<string, unknown>): PanelModel;

interface ScreenshotRequest {
    uid: string;
    panelId?: number;
    width?: number;
    height?: number;
    theme?: 'light' | 'dark';
    from?: string;
    to?: string;
}
interface ScreenshotResult {
    contentType: string;
    url: string;
    bytes?: number;
    /** RGBA pixels when captured via canvas (for visual gates). */
    pixels?: Uint8ClampedArray;
    width?: number;
    height?: number;
}
declare function buildRenderUrl(req: ScreenshotRequest, appSubUrl?: string): string;
declare function placeholderScreenshot(req: ScreenshotRequest): ScreenshotResult;
declare function captureScreenshot(req: ScreenshotRequest): Promise<ScreenshotResult>;
/**
 * Collect a compact structural fingerprint from DOM — testids, data-* viz attrs,
 * SVG path `d`, viewBox, and short text samples. Stronger than title-only seed.
 * Used as offline stand-in for real canvas screenshots until /render exists.
 */
declare function collectDomStructureSeed(el: HTMLElement): string;
/** Deterministic RGBA buffer from structural DOM signals (works without full canvas). */
declare function structuralPixelBuffer(el: HTMLElement, width: number, height: number, background?: string): Uint8ClampedArray;
/**
 * Capture a DOM node to PNG / pixel buffer.
 * Prefer real canvas 2d readback when available (browser / node-canvas);
 * fall back to structuralPixelBuffer under jsdom.
 */
declare function captureDomScreenshot(el: HTMLElement, opts?: {
    width?: number;
    height?: number;
    background?: string;
    preferStructural?: boolean;
}): Promise<ScreenshotResult>;
/** Compare two data-URL screenshots by re-drawing into a fixed grid (no HTMLImageElement). */
declare function pixelDiffRatioFromDataUrls(aUrl: string, bUrl: string, size?: number): number;
declare function pixelDiffRatio(a: Uint8ClampedArray, b: Uint8ClampedArray): number;

declare class DashboardHistory {
    private undoStack;
    private redoStack;
    private limit;
    private checkpointEvery;
    private pushesSinceCheckpoint;
    constructor(limit?: number, checkpointEvery?: number);
    push(doc: DashboardModel, rev?: number): void;
    canUndo(): boolean;
    canRedo(): boolean;
    /** Latest tip revision (for dirty tracking after undo/redo). */
    tipRev(): number;
    undo(current: DashboardModel): {
        doc: DashboardModel;
        rev: number;
    } | null;
    redo(current: DashboardModel): {
        doc: DashboardModel;
        rev: number;
    } | null;
    reset(doc: DashboardModel, rev?: number): void;
    /** Test/debug: count of full checkpoint tips retained. */
    checkpointCount(): number;
}

type SceneNodeKind = 'dashboard' | 'row' | 'panel' | 'variable' | 'timeRange' | 'query';
interface SceneNode {
    uid: string;
    kind: SceneNodeKind;
    title?: string;
    panelId?: number;
    children: SceneNode[];
    state?: Record<string, unknown>;
}
declare function buildSceneGraph(doc: DashboardModel, time?: {
    from: string;
    to: string;
}): SceneNode;
declare function findSceneNode(root: SceneNode, uid: string): SceneNode | null;
declare function flattenPanels(root: SceneNode): SceneNode[];
declare function applyTimeToScene(root: SceneNode, range: Pick<TimeRange, 'from' | 'to'> | {
    from: string;
    to: string;
}): SceneNode;

declare function movePanelByKeyboard(panel: PanelModel, key: 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown', step?: number): GridPos;
declare function resizePanelByKeyboard(panel: PanelModel, key: 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown', step?: number): GridPos;
/** Multi-select helpers for dashboard editor. */
declare function toggleSelection(selected: number[], id: number, additive: boolean): number[];
declare function selectRange(panelIds: number[], fromId: number, toId: number): number[];
declare function nudgeSelection(panels: PanelModel[], selectedIds: number[], key: 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown', step?: number): PanelModel[];

declare function copyPanel(panel: PanelModel): void;
declare function hasClipboardPanel(): boolean;
declare function peekClipboardPanel(): PanelModel | null;
declare function pastePanel(nextId: number, gridPos?: PanelModel['gridPos']): PanelModel | null;
declare function duplicatePanel(panel: PanelModel, nextId: number): PanelModel;
declare function clearClipboard(): void;

interface LibraryPanel {
    uid: string;
    name: string;
    model: PanelModel;
    version: number;
    meta?: {
        folderUid?: string;
        connectedDashboards?: number;
    };
}
declare function saveLibraryPanel$1(panel: PanelModel, name: string, uid?: string): LibraryPanel;
declare function getLibraryPanel(uid: string): LibraryPanel | undefined;
declare function listLibraryPanels(): LibraryPanel[];
declare function instantiateLibraryPanel(uid: string, id: number): PanelModel | undefined;
/** Grafana updateDuplicateLibraryPanels: sync library store from an instance. */
declare function updateLibraryPanelFromInstance(panel: PanelModel): LibraryPanel | null;
/**
 * Apply library model fields onto another instance while preserving instance id / gridPos / library ref.
 */
declare function applyLibraryModelToInstance(instance: PanelModel, lib: LibraryPanel): PanelModel;
/** Sync all panels on a dashboard that share the same libraryPanel.uid. */
declare function syncLibraryPanelInstances(panels: PanelModel[], source: PanelModel): PanelModel[];
/** Remove library link — panel becomes a regular editable panel (Grafana Unlink). */
declare function unlinkLibraryPanel$1(panel: PanelModel): PanelModel;
declare function clearLibraryPanels(): void;

type ImportedDashboardRecord = {
    uid: string;
    title: string;
    raw: Record<string, unknown>;
    /** Original import payload (v2 resource etc.) when available. */
    original?: Record<string, unknown>;
    /**
     * Written by the import wizard: the record exists, but the dashboard has
     * never gone through the Save flow. Keeps the Save button enabled.
     */
    pendingSave?: boolean;
    savedAt: string;
};
/** Accept Grafana export {dashboard, meta} or raw dashboard JSON. */
declare function normalizeImportPayload(input: unknown): Record<string, unknown>;
declare function saveImportedDashboard(raw: Record<string, unknown>, opts?: {
    overwrite?: boolean;
    original?: Record<string, unknown>;
    /** Import wizard only — mark the record as not yet saved by the user. */
    pendingSave?: boolean;
}): ImportedDashboardRecord;
declare function getImportedDashboard(uid: string): Record<string, unknown> | undefined;
declare function listImportedDashboards(): ImportedDashboardRecord[];
declare function removeImportedDashboard(uid: string): void;

interface ImportInput {
    name: string;
    type: 'datasource' | 'constant' | string;
    pluginId?: string;
    pluginName?: string;
    description?: string;
    value?: unknown;
    label?: string;
}
interface DatasourceMapping {
    inputName: string;
    targetUid: string;
    targetType?: string;
}
/**
 * Recursively collect JSON-pointer-like paths to datasource refs.
 * Paths use `/`-joined segments (same as getAtPath/setAtPath).
 */
declare function collectDatasourceRefPaths(dashboard: Record<string, unknown>): string[];
declare function extractInputsFromDashboard(dashboard: Record<string, unknown>): ImportInput[];
/** Replace ${DS_xxx} and matching input placeholders with mapped datasource refs. */
declare function applyDatasourceMappings(dashboard: Record<string, unknown>, mappings: Record<string, string>, typeByUid?: Record<string, string>): Record<string, unknown>;
declare function buildImportPreview(dashboard: Record<string, unknown>, mappings: Record<string, string>, typeByUid?: Record<string, string>): {
    dashboard: Record<string, unknown>;
    unresolved: string[];
};

type ImportWizardStep = 'upload' | 'options' | 'datasources' | 'preview';
interface ImportWizardState {
    step: ImportWizardStep;
    rawText: string;
    envelope?: DashboardDocumentEnvelope;
    /** Original parsed document (v2 resource etc.) retained for round-trip. */
    rawDocument?: Record<string, unknown>;
    title: string;
    uid: string;
    folderUid?: string;
    overwrite: boolean;
    mappings: Record<string, string>;
    typeByUid: Record<string, string>;
    inputs: ImportInput[];
    preview?: {
        dashboard: Record<string, unknown>;
        unresolved: string[];
    };
    error?: string;
    parseLine?: number;
    parseColumn?: number;
    mode: 'local-preview' | 'server';
}
declare function createImportWizardState(): ImportWizardState;
declare function parseWizardPayload(state: ImportWizardState, text: string): ImportWizardState;
/** Async parse via bridge — on failure stays on upload with line/column. */
declare function parseWizardPayloadAsync(state: ImportWizardState, text: string): Promise<ImportWizardState>;
declare function refreshImportPreview(state: ImportWizardState): ImportWizardState;
declare function commitImport(state: ImportWizardState): {
    uid: string;
    title: string;
    raw: Record<string, unknown>;
};

interface DashboardExportOptions {
    mode: 'backup' | 'share';
    datasources?: Array<{
        uid: string;
        type: string;
        name: string;
        pluginVersion?: string;
    }>;
}
declare function exportDashboard(envelope: DashboardDocumentEnvelope | {
    dashboard: Record<string, unknown>;
    original?: Record<string, unknown>;
}, options: DashboardExportOptions): Record<string, unknown>;
declare function assertBackupRoundTrip(envelope: DashboardDocumentEnvelope): string[];

/**
 * Panel edit URL/history controller (Task 7.4).
 * Pure functions — Vue Router adapter wires these.
 */
interface PanelEditRouteState {
    dashboardUid: string;
    panelId: number | string | null;
    edit: boolean;
    view: boolean;
    tab?: string;
    /** invalid when panelId does not exist */
    invalidPanelId?: boolean;
}
interface PanelEditRouteLocation {
    path: string;
    query: Record<string, string | undefined>;
}
declare function parsePanelEditRoute(loc: PanelEditRouteLocation, knownPanelIds?: Array<number | string>): PanelEditRouteState;
declare function buildPanelEditQuery(base: Record<string, string | undefined>, opts: {
    panelId: number | string;
    mode: 'edit' | 'view' | 'none';
    tab?: string;
}): Record<string, string | undefined>;
/** Browser Back from editor should leave edit query (same as UI Back). */
declare function isEditorExitNavigation(from: PanelEditRouteState, to: PanelEditRouteState): boolean;
/** Deep-link to invalid panel id must not open a second session. */
declare function shouldOpenEditSession(state: PanelEditRouteState): boolean;

type PanelEditPhase = 'editing' | 'closed' | 'disposed';
interface PanelEditSession {
    panelId: number | string;
    pathId?: string;
    isNewPanel: boolean;
    isLibraryPanel: boolean;
    /** Snapshot at editor entry (for Discard existing / history before). */
    originalPanelSnapshot: PanelModel;
    originalLayoutSnapshot?: {
        x: number;
        y: number;
        w: number;
        h: number;
    };
    /** Live working panel reference (mutated in place for dashboard working model). */
    workingPanel: PanelModel;
    originalData?: unknown;
    phase: PanelEditPhase;
    tableView: boolean;
    lastResult?: unknown;
    pluginError?: string | null;
    /** True when working differs from saved baseline (revision or snapshot boundary). */
    get isDirty(): boolean;
    /** Saved baseline hash after last successful dashboard/library save while in editor. */
    savedBaselineJson: string;
    /** Hot-path dirty: mutationRevision !== savedRevision (Task 12). */
    mutationRevision: number;
    savedRevision: number;
    /** Bump when working panel mutates without full serialize. */
    touch(): void;
}
interface CreatePanelEditSessionOptions {
    panel: PanelModel;
    isNewPanel?: boolean;
    isLibraryPanel?: boolean;
    pathId?: string;
    originalData?: unknown;
}
declare function createPanelEditSession(opts: CreatePanelEditSessionOptions | PanelModel): PanelEditSession;
declare function mutate(session: PanelEditSession, mutator: (panel: PanelModel) => void): PanelEditSession;
declare function patchDraftOption(session: PanelEditSession, path: string, value: unknown): PanelEditSession;
declare function patchDraftFieldDefaults(session: PanelEditSession, path: string, value: unknown): PanelEditSession;
declare function setDraftQueries(session: PanelEditSession, targets: PanelModel['targets']): PanelEditSession;
declare function setDraftTransformations(session: PanelEditSession, transformations: NonNullable<PanelModel['transformations']>): PanelEditSession;
type BackResult = {
    session: PanelEditSession;
    /** Working model already has latest values; history batch should be committed once by host. */
    retainWorkingChanges: true;
    commitHistoryBatch: true;
};
/** Back keeps working changes on the dashboard document. */
declare function backToDashboard(session: PanelEditSession): BackResult;
type DiscardResult = {
    kind: 'restore-existing';
    session: PanelEditSession;
    panel: PanelModel;
} | {
    kind: 'delete-new';
    session: PanelEditSession;
    panelId: number | string;
};
/** Discard existing restores snapshot; discard new signals deletion. */
declare function discard(session: PanelEditSession): DiscardResult;
/** After dashboard save while remaining in editor: refresh baseline, stay editing. */
declare function dashboardSaved(session: PanelEditSession): PanelEditSession;
declare function saveLibraryPanel(session: PanelEditSession): PanelEditSession;
declare function unlinkLibraryPanel(session: PanelEditSession): PanelEditSession;
declare function dispose(session: PanelEditSession): PanelEditSession;
/** Command surface — PanelEditor should dispatch instead of owning parallel draft state long-term. */
type PanelEditCommand = {
    type: 'mutate';
    mutator: (panel: PanelModel) => void;
} | {
    type: 'patch-option';
    path: string;
    value: unknown;
} | {
    type: 'patch-field-defaults';
    path: string;
    value: unknown;
} | {
    type: 'set-queries';
    targets: PanelModel['targets'];
} | {
    type: 'set-transformations';
    transformations: NonNullable<PanelModel['transformations']>;
} | {
    type: 'set-table-view';
    value: boolean;
} | {
    type: 'set-plugin-error';
    error: string | null;
} | {
    type: 'set-last-result';
    result: unknown;
} | {
    type: 'back';
} | {
    type: 'discard';
} | {
    type: 'dashboard-saved';
} | {
    type: 'save-library';
} | {
    type: 'unlink-library';
} | {
    type: 'dispose';
};
type PanelEditEffect = {
    type: 'none';
    session: PanelEditSession;
} | {
    type: 'back';
    session: PanelEditSession;
    result: BackResult;
} | {
    type: 'discard';
    session: PanelEditSession;
    result: DiscardResult;
} | {
    type: 'disposed';
    session: PanelEditSession;
};
/**
 * Single command entry for panel edit sessions (design .
 * Existing named helpers remain as thin wrappers for call-site migration.
 */
declare function dispatch(session: PanelEditSession, command: PanelEditCommand): PanelEditEffect;

/**
 * Host-side PanelEditSession lifecycle (Task 7.3/7.7).
 * DashboardPage / store adapter — pure functions over session + panel list ops.
 */

type PanelEditHostState = {
    session: PanelEditSession | null;
};
declare function openPanelEditSession(panel: PanelModel, opts?: {
    isNewPanel?: boolean;
    isLibraryPanel?: boolean;
    pathId?: string;
}): PanelEditSession;
type ExitBackResult = {
    kind: 'back';
    session: PanelEditSession;
    panel: PanelModel;
    commitHistory: boolean;
};
type ExitDiscardResult = {
    kind: 'discard-restore';
    session: PanelEditSession;
    panel: PanelModel;
} | {
    kind: 'discard-delete';
    session: PanelEditSession;
    panelId: number | string;
};
/** Back: keep working panel values (draft already applied to working panel by editor). */
declare function exitBack(session: PanelEditSession, workingPanel: PanelModel): ExitBackResult;
/** Discard: restore snapshot or delete new panel. Editor draft is ignored. */
declare function exitDiscard(session: PanelEditSession): ExitDiscardResult;
/** Save dashboard while staying in editor — refresh dirty baseline. */
declare function saveDashboardWhileEditing(session: PanelEditSession, workingPanel: PanelModel): PanelEditSession;
/** View/Edit mutual exclusion for query params. */
declare function exclusiveEditViewQuery(base: Record<string, string | undefined>, opts: {
    panelId: number | string;
    mode: 'edit' | 'view' | 'none';
}): Record<string, string | undefined>;

/**
 * Unified query -> transform -> field-display pipeline (Task 7.5 / Task 9).
 * Used by PanelEditor preview and dashboard refresh paths.
 *
 * Sync API (`runPanelDataPipeline`) stays main-thread for existing callers.
 * Async API (`runPanelDataPipelineAsync`) uses Worker above threshold with
 * crash/abort-safe fallback.
 */

type PanelPipelineInput = {
    series: DataFrame[];
    transformations?: unknown[];
    fieldConfigDefaults?: FieldConfig;
    fieldConfigOverrides?: unknown[];
    state?: PanelData['state'];
    timeRange?: PanelData['timeRange'];
    requestId?: string;
    annotations?: DataFrame[];
    errors?: PanelData['errors'];
    error?: PanelData['error'];
    /** Editor preview may enable transform traces; dashboard refresh defaults false. */
    withTrace?: boolean;
    /** Optional abort for async worker path. */
    signal?: AbortSignal;
    /** Optional generation token for worker stale-result suppression. */
    generation?: number;
};
type PanelPipelineResult = {
    series: DataFrame[];
    transformTrace: ReturnType<typeof applyTransformationsWithTrace>['steps'];
    diagnostics: ReturnType<typeof applyTransformationsWithTrace>['diagnostics'];
    panelData: PanelData;
    workerDecision?: ReturnType<typeof shouldUsePipelineWorker>;
    /** True when input series identity was preserved (no-op path). */
    reusedInputSeries?: boolean;
    /** How the async path executed (sync path omits or uses main-sync). */
    executionPath?: 'main-sync' | 'worker' | 'main-fallback' | 'main-chunked';
    /** Compiled config revision when cache was used. */
    configRevision?: string;
};
/**
 * Apply transformations then field overrides — Grafana panel processing order.
 * No-op configs reuse input frame references (Task 9).
 * Always main-thread / synchronous for existing callers.
 */
declare function runPanelDataPipeline(input: PanelPipelineInput): PanelPipelineResult;
/**
 * Async pipeline: Worker when above threshold and enabled; otherwise main thread.
 * Small payloads stay on main thread (ADR 0004). Abort cleans pending map.
 */
declare function runPanelDataPipelineAsync(input: PanelPipelineInput): Promise<PanelPipelineResult>;
/** Stable hash for pipeline identity tests (canonical JSON). */
declare function hashPanelPipelineSeries(series: DataFrame[]): string;

/**
 * Grafana panel timeFrom / timeShift override.
 * @see refs/grafana-main PanelTimeRange.getTimeOverride
 */

type PanelTimeOverrideResult = {
    range: TimeRange;
    /** Human-readable badge text (empty when no override). */
    timeInfo: string;
    /** True when override is active and should show in chrome (unless hideTimeOverride). */
    showOverride: boolean;
};

interface DashboardViewerDatasource {
    /** Matches dashboard JSON datasource.uid */
    uid: string;
    /** Datasource type, e.g. prometheus / alexanderzobnin-zabbix-datasource */
    type: string;
    /** Display name */
    name: string;
    /** Datasource URL */
    url: string;
    basicAuth?: boolean;
    basicAuthUser?: string;
    basicAuthPassword?: string;
    jsonData?: Record<string, unknown>;
    secureJsonData?: Record<string, unknown>;
}
interface DashboardViewerExposed {
    getJson(): Record<string, unknown>;
    getJsonString(): string;
}

type EmbeddedDatasource = DashboardViewerDatasource & {
    isDefault?: boolean;
};

type GrafanaDashboardMode = 'preview' | 'edit';
type GrafanaDashboardPersistence = (dashboard: Record<string, unknown>) => Promise<void>;
interface GrafanaDashboardError {
    phase: 'load' | 'save' | 'replace';
    message: string;
}
interface GrafanaDashboardExposed {
    getJson(): Record<string, unknown>;
    getJsonString(): string;
    discard(): Promise<void>;
}

declare const useDashboardStore: pinia.StoreDefinition<"dashboard", Pick<{
    document: vue.Ref<{
        [x: string]: unknown;
        uid?: string | undefined;
        title: string;
        description?: string | undefined;
        tags?: string[] | undefined;
        timezone?: string | undefined;
        schemaVersion: number;
        version?: number | undefined;
        editable?: boolean | undefined;
        graphTooltip?: number | undefined;
        time?: {
            from: string;
            to: string;
        } | undefined;
        timepicker?: Record<string, unknown> | undefined;
        refresh?: string | undefined;
        panels?: {
            [x: string]: unknown;
            id: number;
            type: string;
            title?: string | undefined;
            description?: string | undefined;
            gridPos?: {
                x: number;
                y: number;
                w: number;
                h: number;
            } | undefined;
            targets?: {
                [x: string]: unknown;
                refId: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                hide?: boolean | undefined;
                queryType?: string | undefined;
            }[] | undefined;
            options?: Record<string, unknown> | undefined;
            fieldConfig?: {
                defaults: {
                    [x: string]: unknown;
                    displayName?: string | undefined;
                    unit?: string | undefined;
                    decimals?: number | null | undefined;
                    min?: number | null | undefined;
                    max?: number | null | undefined;
                    mappings?: {
                        type: string;
                        options: Record<string, unknown>;
                    }[] | undefined;
                    thresholds?: {
                        mode: "absolute" | "percentage";
                        steps: {
                            value: number;
                            color: string;
                        }[];
                    } | undefined;
                    color?: {
                        mode?: string | undefined;
                        fixedColor?: string | undefined;
                    } | undefined;
                    links?: {
                        title: string;
                        url: string;
                        targetBlank?: boolean | undefined;
                    }[] | undefined;
                    custom?: Record<string, unknown> | undefined;
                };
                overrides: {
                    matcher: {
                        id: string;
                        options?: unknown;
                    };
                    properties: {
                        id: string;
                        value?: unknown;
                    }[];
                }[];
            } | undefined;
            transformations?: {
                id: string;
                options?: Record<string, unknown> | undefined;
            }[] | undefined;
            isNew?: boolean | undefined;
            datasource?: {
                type?: string | undefined;
                uid?: string | undefined;
            } | undefined;
            transparent?: boolean | undefined;
        }[] | undefined;
        templating?: {
            list: {
                [x: string]: unknown;
                name: string;
                type: _grafana_data.VariableType;
                label?: string | undefined;
                hide?: number | undefined;
                current?: {
                    text: string | string[];
                    value: string | string[];
                } | undefined;
                options?: {
                    text: string;
                    value: string;
                    selected?: boolean | undefined;
                }[] | undefined;
                query?: (string | Record<string, unknown>) | undefined;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                multi?: boolean | undefined;
                includeAll?: boolean | undefined;
                allValue?: string | undefined;
                regex?: string | undefined;
                refresh?: number | undefined;
                sort?: number | undefined;
                definition?: string | undefined;
            }[];
        } | undefined;
        annotations?: {
            list: {
                [x: string]: unknown;
                name: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                enable?: boolean | undefined;
                hide?: boolean | undefined;
                iconColor?: string | undefined;
                target?: Record<string, unknown> | undefined;
            }[];
        } | undefined;
        links?: {
            title: string;
            url: string;
            targetBlank?: boolean | undefined;
        }[] | undefined;
        fiscalYearStartMonth?: number | undefined;
        weekStart?: string | undefined;
        liveNow?: boolean | undefined;
    } | null, DashboardModel | {
        [x: string]: unknown;
        uid?: string | undefined;
        title: string;
        description?: string | undefined;
        tags?: string[] | undefined;
        timezone?: string | undefined;
        schemaVersion: number;
        version?: number | undefined;
        editable?: boolean | undefined;
        graphTooltip?: number | undefined;
        time?: {
            from: string;
            to: string;
        } | undefined;
        timepicker?: Record<string, unknown> | undefined;
        refresh?: string | undefined;
        panels?: {
            [x: string]: unknown;
            id: number;
            type: string;
            title?: string | undefined;
            description?: string | undefined;
            gridPos?: {
                x: number;
                y: number;
                w: number;
                h: number;
            } | undefined;
            targets?: {
                [x: string]: unknown;
                refId: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                hide?: boolean | undefined;
                queryType?: string | undefined;
            }[] | undefined;
            options?: Record<string, unknown> | undefined;
            fieldConfig?: {
                defaults: {
                    [x: string]: unknown;
                    displayName?: string | undefined;
                    unit?: string | undefined;
                    decimals?: number | null | undefined;
                    min?: number | null | undefined;
                    max?: number | null | undefined;
                    mappings?: {
                        type: string;
                        options: Record<string, unknown>;
                    }[] | undefined;
                    thresholds?: {
                        mode: "absolute" | "percentage";
                        steps: {
                            value: number;
                            color: string;
                        }[];
                    } | undefined;
                    color?: {
                        mode?: string | undefined;
                        fixedColor?: string | undefined;
                    } | undefined;
                    links?: {
                        title: string;
                        url: string;
                        targetBlank?: boolean | undefined;
                    }[] | undefined;
                    custom?: Record<string, unknown> | undefined;
                };
                overrides: {
                    matcher: {
                        id: string;
                        options?: unknown;
                    };
                    properties: {
                        id: string;
                        value?: unknown;
                    }[];
                }[];
            } | undefined;
            transformations?: {
                id: string;
                options?: Record<string, unknown> | undefined;
            }[] | undefined;
            isNew?: boolean | undefined;
            datasource?: {
                type?: string | undefined;
                uid?: string | undefined;
            } | undefined;
            transparent?: boolean | undefined;
        }[] | undefined;
        templating?: {
            list: {
                [x: string]: unknown;
                name: string;
                type: _grafana_data.VariableType;
                label?: string | undefined;
                hide?: number | undefined;
                current?: {
                    text: string | string[];
                    value: string | string[];
                } | undefined;
                options?: {
                    text: string;
                    value: string;
                    selected?: boolean | undefined;
                }[] | undefined;
                query?: (string | Record<string, unknown>) | undefined;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                multi?: boolean | undefined;
                includeAll?: boolean | undefined;
                allValue?: string | undefined;
                regex?: string | undefined;
                refresh?: number | undefined;
                sort?: number | undefined;
                definition?: string | undefined;
            }[];
        } | undefined;
        annotations?: {
            list: {
                [x: string]: unknown;
                name: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                enable?: boolean | undefined;
                hide?: boolean | undefined;
                iconColor?: string | undefined;
                target?: Record<string, unknown> | undefined;
            }[];
        } | undefined;
        links?: {
            title: string;
            url: string;
            targetBlank?: boolean | undefined;
        }[] | undefined;
        fiscalYearStartMonth?: number | undefined;
        weekStart?: string | undefined;
        liveNow?: boolean | undefined;
    } | null>;
    dirty: vue.Ref<boolean, boolean>;
    neverSaved: vue.Ref<boolean, boolean>;
    editMode: vue.Ref<boolean, boolean>;
    loading: vue.Ref<boolean, boolean>;
    error: vue.Ref<string | null, string | null>;
    panelData: vue.ShallowRef<Record<number, PanelData>, Record<number, PanelData>>;
    time: vue.Ref<{
        from: string;
        to: string;
    }, {
        from: string;
        to: string;
    } | {
        from: string;
        to: string;
    }>;
    timezone: vue.Ref<string, string>;
    weekStart: vue.Ref<string, string>;
    liveNow: vue.Ref<boolean, boolean>;
    liveNowTickCount: vue.Ref<number, number>;
    refresh: vue.Ref<string, string>;
    isRefreshing: vue.Ref<boolean, boolean>;
    autoRefreshTickCount: vue.Ref<number, number>;
    setRefresh: (interval: string) => void;
    saving: vue.Ref<boolean, boolean>;
    saveError: vue.Ref<string | null, string | null>;
    panels: vue.ComputedRef<PanelModel[]>;
    layout: vue.ComputedRef<GridLayoutItem[]>;
    title: vue.ComputedRef<string>;
    scene: vue.ComputedRef<__.SceneNode | null>;
    loadByUid: (uid: string) => Promise<void>;
    loadLocal: (raw: Record<string, unknown>) => Promise<void>;
    refreshPanel: (panel: PanelModel) => Promise<void>;
    setPanelVisible: (panelId: number, visible: boolean) => void;
    visiblePanels: vue.Ref<Set<number> & Omit<Set<number>, keyof Set<any>>, Set<number> | (Set<number> & Omit<Set<number>, keyof Set<any>>)>;
    refreshAllPanels: () => Promise<void>;
    canEditDashboard: () => boolean;
    setEditMode: (v: boolean) => void;
    updateLayout: (next: GridLayoutItem[]) => void;
    updatePanel: (panel: PanelModel) => void;
    addPanel: (type?: string) => number | undefined;
    deletePanel: (panelId: number) => void;
    seedPanelData: (panelId: number, data: PanelData) => void;
    save: () => Promise<void>;
    setPersistenceHandler: (handler: GrafanaDashboardPersistence | null) => void;
    restoreSaved: () => Promise<void>;
    setTime: (from: string, to: string) => void;
    getTimeRange: () => TimeRange;
    getPanelTimeOverride: (panel: PanelModel) => PanelTimeOverrideResult;
    getRefreshIntervals: () => string[];
    getQuickRanges: () => Array<{
        label: string;
        from: string;
        to: string;
    }> | null;
    isTimepickerHidden: () => boolean;
    getNowDelayMs: () => number;
    getFiscalYearStartMonth: () => number;
    setTimezone: (tz: string) => void;
    setWeekStart: (next: string) => void;
    setLiveNow: (on: boolean) => void;
    registerDataSource: (ds: DataSourceApi) => void;
    unregisterDataSource: (uid: string) => void;
    setEmbeddedDatasources: (list: EmbeddedDatasource[]) => void;
    applyDocumentEmbeddedDatasources: () => void;
    dispose: () => void;
    serializeDocument: () => string;
    scheduler: QueryScheduler;
    undo: () => void;
    redo: () => void;
    canUndo: vue.Ref<boolean, boolean>;
    canRedo: vue.Ref<boolean, boolean>;
    refreshVariables: (trigger?: VariableRefreshTrigger) => Promise<void>;
    syncVariablesFromLocation: () => void;
    syncVariablesToLocation: () => void;
    pushHistory: () => void;
    annotationEvents: vue.Ref<{
        time: number;
        timeEnd?: number | undefined;
        title: string;
        text?: string | undefined;
        tags?: string[] | undefined;
        color?: string | undefined;
    }[], AnnotationEvent[] | {
        time: number;
        timeEnd?: number | undefined;
        title: string;
        text?: string | undefined;
        tags?: string[] | undefined;
        color?: string | undefined;
    }[]>;
    selectedPanelIds: vue.Ref<number[], number[]>;
    refreshAnnotations: () => Promise<void>;
    setVariable: (name: string, value: string | string[]) => void;
    updateVariables: (list: any[]) => void;
    copySelectedPanel: (panelId: number) => void;
    pasteClipboardPanel: () => void;
    duplicateSelectedPanel: (panelId: number) => void;
    setSelectedPanels: (ids: number[]) => void;
    saveSelectedAsLibraryPanel: (panelId: number, name?: string) => __.LibraryPanel | null;
    unlinkLibraryPanel: (panelId: number) => void;
    addLibraryPanelToDashboard: (uid: string) => void;
    listSavedLibraryPanels: () => __.LibraryPanel[];
}, "time" | "timezone" | "refresh" | "weekStart" | "liveNow" | "error" | "panelData" | "document" | "dirty" | "neverSaved" | "editMode" | "loading" | "liveNowTickCount" | "isRefreshing" | "autoRefreshTickCount" | "saving" | "saveError" | "visiblePanels" | "scheduler" | "canUndo" | "canRedo" | "annotationEvents" | "selectedPanelIds">, Pick<{
    document: vue.Ref<{
        [x: string]: unknown;
        uid?: string | undefined;
        title: string;
        description?: string | undefined;
        tags?: string[] | undefined;
        timezone?: string | undefined;
        schemaVersion: number;
        version?: number | undefined;
        editable?: boolean | undefined;
        graphTooltip?: number | undefined;
        time?: {
            from: string;
            to: string;
        } | undefined;
        timepicker?: Record<string, unknown> | undefined;
        refresh?: string | undefined;
        panels?: {
            [x: string]: unknown;
            id: number;
            type: string;
            title?: string | undefined;
            description?: string | undefined;
            gridPos?: {
                x: number;
                y: number;
                w: number;
                h: number;
            } | undefined;
            targets?: {
                [x: string]: unknown;
                refId: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                hide?: boolean | undefined;
                queryType?: string | undefined;
            }[] | undefined;
            options?: Record<string, unknown> | undefined;
            fieldConfig?: {
                defaults: {
                    [x: string]: unknown;
                    displayName?: string | undefined;
                    unit?: string | undefined;
                    decimals?: number | null | undefined;
                    min?: number | null | undefined;
                    max?: number | null | undefined;
                    mappings?: {
                        type: string;
                        options: Record<string, unknown>;
                    }[] | undefined;
                    thresholds?: {
                        mode: "absolute" | "percentage";
                        steps: {
                            value: number;
                            color: string;
                        }[];
                    } | undefined;
                    color?: {
                        mode?: string | undefined;
                        fixedColor?: string | undefined;
                    } | undefined;
                    links?: {
                        title: string;
                        url: string;
                        targetBlank?: boolean | undefined;
                    }[] | undefined;
                    custom?: Record<string, unknown> | undefined;
                };
                overrides: {
                    matcher: {
                        id: string;
                        options?: unknown;
                    };
                    properties: {
                        id: string;
                        value?: unknown;
                    }[];
                }[];
            } | undefined;
            transformations?: {
                id: string;
                options?: Record<string, unknown> | undefined;
            }[] | undefined;
            isNew?: boolean | undefined;
            datasource?: {
                type?: string | undefined;
                uid?: string | undefined;
            } | undefined;
            transparent?: boolean | undefined;
        }[] | undefined;
        templating?: {
            list: {
                [x: string]: unknown;
                name: string;
                type: _grafana_data.VariableType;
                label?: string | undefined;
                hide?: number | undefined;
                current?: {
                    text: string | string[];
                    value: string | string[];
                } | undefined;
                options?: {
                    text: string;
                    value: string;
                    selected?: boolean | undefined;
                }[] | undefined;
                query?: (string | Record<string, unknown>) | undefined;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                multi?: boolean | undefined;
                includeAll?: boolean | undefined;
                allValue?: string | undefined;
                regex?: string | undefined;
                refresh?: number | undefined;
                sort?: number | undefined;
                definition?: string | undefined;
            }[];
        } | undefined;
        annotations?: {
            list: {
                [x: string]: unknown;
                name: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                enable?: boolean | undefined;
                hide?: boolean | undefined;
                iconColor?: string | undefined;
                target?: Record<string, unknown> | undefined;
            }[];
        } | undefined;
        links?: {
            title: string;
            url: string;
            targetBlank?: boolean | undefined;
        }[] | undefined;
        fiscalYearStartMonth?: number | undefined;
        weekStart?: string | undefined;
        liveNow?: boolean | undefined;
    } | null, DashboardModel | {
        [x: string]: unknown;
        uid?: string | undefined;
        title: string;
        description?: string | undefined;
        tags?: string[] | undefined;
        timezone?: string | undefined;
        schemaVersion: number;
        version?: number | undefined;
        editable?: boolean | undefined;
        graphTooltip?: number | undefined;
        time?: {
            from: string;
            to: string;
        } | undefined;
        timepicker?: Record<string, unknown> | undefined;
        refresh?: string | undefined;
        panels?: {
            [x: string]: unknown;
            id: number;
            type: string;
            title?: string | undefined;
            description?: string | undefined;
            gridPos?: {
                x: number;
                y: number;
                w: number;
                h: number;
            } | undefined;
            targets?: {
                [x: string]: unknown;
                refId: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                hide?: boolean | undefined;
                queryType?: string | undefined;
            }[] | undefined;
            options?: Record<string, unknown> | undefined;
            fieldConfig?: {
                defaults: {
                    [x: string]: unknown;
                    displayName?: string | undefined;
                    unit?: string | undefined;
                    decimals?: number | null | undefined;
                    min?: number | null | undefined;
                    max?: number | null | undefined;
                    mappings?: {
                        type: string;
                        options: Record<string, unknown>;
                    }[] | undefined;
                    thresholds?: {
                        mode: "absolute" | "percentage";
                        steps: {
                            value: number;
                            color: string;
                        }[];
                    } | undefined;
                    color?: {
                        mode?: string | undefined;
                        fixedColor?: string | undefined;
                    } | undefined;
                    links?: {
                        title: string;
                        url: string;
                        targetBlank?: boolean | undefined;
                    }[] | undefined;
                    custom?: Record<string, unknown> | undefined;
                };
                overrides: {
                    matcher: {
                        id: string;
                        options?: unknown;
                    };
                    properties: {
                        id: string;
                        value?: unknown;
                    }[];
                }[];
            } | undefined;
            transformations?: {
                id: string;
                options?: Record<string, unknown> | undefined;
            }[] | undefined;
            isNew?: boolean | undefined;
            datasource?: {
                type?: string | undefined;
                uid?: string | undefined;
            } | undefined;
            transparent?: boolean | undefined;
        }[] | undefined;
        templating?: {
            list: {
                [x: string]: unknown;
                name: string;
                type: _grafana_data.VariableType;
                label?: string | undefined;
                hide?: number | undefined;
                current?: {
                    text: string | string[];
                    value: string | string[];
                } | undefined;
                options?: {
                    text: string;
                    value: string;
                    selected?: boolean | undefined;
                }[] | undefined;
                query?: (string | Record<string, unknown>) | undefined;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                multi?: boolean | undefined;
                includeAll?: boolean | undefined;
                allValue?: string | undefined;
                regex?: string | undefined;
                refresh?: number | undefined;
                sort?: number | undefined;
                definition?: string | undefined;
            }[];
        } | undefined;
        annotations?: {
            list: {
                [x: string]: unknown;
                name: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                enable?: boolean | undefined;
                hide?: boolean | undefined;
                iconColor?: string | undefined;
                target?: Record<string, unknown> | undefined;
            }[];
        } | undefined;
        links?: {
            title: string;
            url: string;
            targetBlank?: boolean | undefined;
        }[] | undefined;
        fiscalYearStartMonth?: number | undefined;
        weekStart?: string | undefined;
        liveNow?: boolean | undefined;
    } | null>;
    dirty: vue.Ref<boolean, boolean>;
    neverSaved: vue.Ref<boolean, boolean>;
    editMode: vue.Ref<boolean, boolean>;
    loading: vue.Ref<boolean, boolean>;
    error: vue.Ref<string | null, string | null>;
    panelData: vue.ShallowRef<Record<number, PanelData>, Record<number, PanelData>>;
    time: vue.Ref<{
        from: string;
        to: string;
    }, {
        from: string;
        to: string;
    } | {
        from: string;
        to: string;
    }>;
    timezone: vue.Ref<string, string>;
    weekStart: vue.Ref<string, string>;
    liveNow: vue.Ref<boolean, boolean>;
    liveNowTickCount: vue.Ref<number, number>;
    refresh: vue.Ref<string, string>;
    isRefreshing: vue.Ref<boolean, boolean>;
    autoRefreshTickCount: vue.Ref<number, number>;
    setRefresh: (interval: string) => void;
    saving: vue.Ref<boolean, boolean>;
    saveError: vue.Ref<string | null, string | null>;
    panels: vue.ComputedRef<PanelModel[]>;
    layout: vue.ComputedRef<GridLayoutItem[]>;
    title: vue.ComputedRef<string>;
    scene: vue.ComputedRef<__.SceneNode | null>;
    loadByUid: (uid: string) => Promise<void>;
    loadLocal: (raw: Record<string, unknown>) => Promise<void>;
    refreshPanel: (panel: PanelModel) => Promise<void>;
    setPanelVisible: (panelId: number, visible: boolean) => void;
    visiblePanels: vue.Ref<Set<number> & Omit<Set<number>, keyof Set<any>>, Set<number> | (Set<number> & Omit<Set<number>, keyof Set<any>>)>;
    refreshAllPanels: () => Promise<void>;
    canEditDashboard: () => boolean;
    setEditMode: (v: boolean) => void;
    updateLayout: (next: GridLayoutItem[]) => void;
    updatePanel: (panel: PanelModel) => void;
    addPanel: (type?: string) => number | undefined;
    deletePanel: (panelId: number) => void;
    seedPanelData: (panelId: number, data: PanelData) => void;
    save: () => Promise<void>;
    setPersistenceHandler: (handler: GrafanaDashboardPersistence | null) => void;
    restoreSaved: () => Promise<void>;
    setTime: (from: string, to: string) => void;
    getTimeRange: () => TimeRange;
    getPanelTimeOverride: (panel: PanelModel) => PanelTimeOverrideResult;
    getRefreshIntervals: () => string[];
    getQuickRanges: () => Array<{
        label: string;
        from: string;
        to: string;
    }> | null;
    isTimepickerHidden: () => boolean;
    getNowDelayMs: () => number;
    getFiscalYearStartMonth: () => number;
    setTimezone: (tz: string) => void;
    setWeekStart: (next: string) => void;
    setLiveNow: (on: boolean) => void;
    registerDataSource: (ds: DataSourceApi) => void;
    unregisterDataSource: (uid: string) => void;
    setEmbeddedDatasources: (list: EmbeddedDatasource[]) => void;
    applyDocumentEmbeddedDatasources: () => void;
    dispose: () => void;
    serializeDocument: () => string;
    scheduler: QueryScheduler;
    undo: () => void;
    redo: () => void;
    canUndo: vue.Ref<boolean, boolean>;
    canRedo: vue.Ref<boolean, boolean>;
    refreshVariables: (trigger?: VariableRefreshTrigger) => Promise<void>;
    syncVariablesFromLocation: () => void;
    syncVariablesToLocation: () => void;
    pushHistory: () => void;
    annotationEvents: vue.Ref<{
        time: number;
        timeEnd?: number | undefined;
        title: string;
        text?: string | undefined;
        tags?: string[] | undefined;
        color?: string | undefined;
    }[], AnnotationEvent[] | {
        time: number;
        timeEnd?: number | undefined;
        title: string;
        text?: string | undefined;
        tags?: string[] | undefined;
        color?: string | undefined;
    }[]>;
    selectedPanelIds: vue.Ref<number[], number[]>;
    refreshAnnotations: () => Promise<void>;
    setVariable: (name: string, value: string | string[]) => void;
    updateVariables: (list: any[]) => void;
    copySelectedPanel: (panelId: number) => void;
    pasteClipboardPanel: () => void;
    duplicateSelectedPanel: (panelId: number) => void;
    setSelectedPanels: (ids: number[]) => void;
    saveSelectedAsLibraryPanel: (panelId: number, name?: string) => __.LibraryPanel | null;
    unlinkLibraryPanel: (panelId: number) => void;
    addLibraryPanelToDashboard: (uid: string) => void;
    listSavedLibraryPanels: () => __.LibraryPanel[];
}, "title" | "panels" | "layout" | "scene">, Pick<{
    document: vue.Ref<{
        [x: string]: unknown;
        uid?: string | undefined;
        title: string;
        description?: string | undefined;
        tags?: string[] | undefined;
        timezone?: string | undefined;
        schemaVersion: number;
        version?: number | undefined;
        editable?: boolean | undefined;
        graphTooltip?: number | undefined;
        time?: {
            from: string;
            to: string;
        } | undefined;
        timepicker?: Record<string, unknown> | undefined;
        refresh?: string | undefined;
        panels?: {
            [x: string]: unknown;
            id: number;
            type: string;
            title?: string | undefined;
            description?: string | undefined;
            gridPos?: {
                x: number;
                y: number;
                w: number;
                h: number;
            } | undefined;
            targets?: {
                [x: string]: unknown;
                refId: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                hide?: boolean | undefined;
                queryType?: string | undefined;
            }[] | undefined;
            options?: Record<string, unknown> | undefined;
            fieldConfig?: {
                defaults: {
                    [x: string]: unknown;
                    displayName?: string | undefined;
                    unit?: string | undefined;
                    decimals?: number | null | undefined;
                    min?: number | null | undefined;
                    max?: number | null | undefined;
                    mappings?: {
                        type: string;
                        options: Record<string, unknown>;
                    }[] | undefined;
                    thresholds?: {
                        mode: "absolute" | "percentage";
                        steps: {
                            value: number;
                            color: string;
                        }[];
                    } | undefined;
                    color?: {
                        mode?: string | undefined;
                        fixedColor?: string | undefined;
                    } | undefined;
                    links?: {
                        title: string;
                        url: string;
                        targetBlank?: boolean | undefined;
                    }[] | undefined;
                    custom?: Record<string, unknown> | undefined;
                };
                overrides: {
                    matcher: {
                        id: string;
                        options?: unknown;
                    };
                    properties: {
                        id: string;
                        value?: unknown;
                    }[];
                }[];
            } | undefined;
            transformations?: {
                id: string;
                options?: Record<string, unknown> | undefined;
            }[] | undefined;
            isNew?: boolean | undefined;
            datasource?: {
                type?: string | undefined;
                uid?: string | undefined;
            } | undefined;
            transparent?: boolean | undefined;
        }[] | undefined;
        templating?: {
            list: {
                [x: string]: unknown;
                name: string;
                type: _grafana_data.VariableType;
                label?: string | undefined;
                hide?: number | undefined;
                current?: {
                    text: string | string[];
                    value: string | string[];
                } | undefined;
                options?: {
                    text: string;
                    value: string;
                    selected?: boolean | undefined;
                }[] | undefined;
                query?: (string | Record<string, unknown>) | undefined;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                multi?: boolean | undefined;
                includeAll?: boolean | undefined;
                allValue?: string | undefined;
                regex?: string | undefined;
                refresh?: number | undefined;
                sort?: number | undefined;
                definition?: string | undefined;
            }[];
        } | undefined;
        annotations?: {
            list: {
                [x: string]: unknown;
                name: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                enable?: boolean | undefined;
                hide?: boolean | undefined;
                iconColor?: string | undefined;
                target?: Record<string, unknown> | undefined;
            }[];
        } | undefined;
        links?: {
            title: string;
            url: string;
            targetBlank?: boolean | undefined;
        }[] | undefined;
        fiscalYearStartMonth?: number | undefined;
        weekStart?: string | undefined;
        liveNow?: boolean | undefined;
    } | null, DashboardModel | {
        [x: string]: unknown;
        uid?: string | undefined;
        title: string;
        description?: string | undefined;
        tags?: string[] | undefined;
        timezone?: string | undefined;
        schemaVersion: number;
        version?: number | undefined;
        editable?: boolean | undefined;
        graphTooltip?: number | undefined;
        time?: {
            from: string;
            to: string;
        } | undefined;
        timepicker?: Record<string, unknown> | undefined;
        refresh?: string | undefined;
        panels?: {
            [x: string]: unknown;
            id: number;
            type: string;
            title?: string | undefined;
            description?: string | undefined;
            gridPos?: {
                x: number;
                y: number;
                w: number;
                h: number;
            } | undefined;
            targets?: {
                [x: string]: unknown;
                refId: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                hide?: boolean | undefined;
                queryType?: string | undefined;
            }[] | undefined;
            options?: Record<string, unknown> | undefined;
            fieldConfig?: {
                defaults: {
                    [x: string]: unknown;
                    displayName?: string | undefined;
                    unit?: string | undefined;
                    decimals?: number | null | undefined;
                    min?: number | null | undefined;
                    max?: number | null | undefined;
                    mappings?: {
                        type: string;
                        options: Record<string, unknown>;
                    }[] | undefined;
                    thresholds?: {
                        mode: "absolute" | "percentage";
                        steps: {
                            value: number;
                            color: string;
                        }[];
                    } | undefined;
                    color?: {
                        mode?: string | undefined;
                        fixedColor?: string | undefined;
                    } | undefined;
                    links?: {
                        title: string;
                        url: string;
                        targetBlank?: boolean | undefined;
                    }[] | undefined;
                    custom?: Record<string, unknown> | undefined;
                };
                overrides: {
                    matcher: {
                        id: string;
                        options?: unknown;
                    };
                    properties: {
                        id: string;
                        value?: unknown;
                    }[];
                }[];
            } | undefined;
            transformations?: {
                id: string;
                options?: Record<string, unknown> | undefined;
            }[] | undefined;
            isNew?: boolean | undefined;
            datasource?: {
                type?: string | undefined;
                uid?: string | undefined;
            } | undefined;
            transparent?: boolean | undefined;
        }[] | undefined;
        templating?: {
            list: {
                [x: string]: unknown;
                name: string;
                type: _grafana_data.VariableType;
                label?: string | undefined;
                hide?: number | undefined;
                current?: {
                    text: string | string[];
                    value: string | string[];
                } | undefined;
                options?: {
                    text: string;
                    value: string;
                    selected?: boolean | undefined;
                }[] | undefined;
                query?: (string | Record<string, unknown>) | undefined;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                multi?: boolean | undefined;
                includeAll?: boolean | undefined;
                allValue?: string | undefined;
                regex?: string | undefined;
                refresh?: number | undefined;
                sort?: number | undefined;
                definition?: string | undefined;
            }[];
        } | undefined;
        annotations?: {
            list: {
                [x: string]: unknown;
                name: string;
                datasource?: {
                    type?: string | undefined;
                    uid?: string | undefined;
                } | undefined;
                enable?: boolean | undefined;
                hide?: boolean | undefined;
                iconColor?: string | undefined;
                target?: Record<string, unknown> | undefined;
            }[];
        } | undefined;
        links?: {
            title: string;
            url: string;
            targetBlank?: boolean | undefined;
        }[] | undefined;
        fiscalYearStartMonth?: number | undefined;
        weekStart?: string | undefined;
        liveNow?: boolean | undefined;
    } | null>;
    dirty: vue.Ref<boolean, boolean>;
    neverSaved: vue.Ref<boolean, boolean>;
    editMode: vue.Ref<boolean, boolean>;
    loading: vue.Ref<boolean, boolean>;
    error: vue.Ref<string | null, string | null>;
    panelData: vue.ShallowRef<Record<number, PanelData>, Record<number, PanelData>>;
    time: vue.Ref<{
        from: string;
        to: string;
    }, {
        from: string;
        to: string;
    } | {
        from: string;
        to: string;
    }>;
    timezone: vue.Ref<string, string>;
    weekStart: vue.Ref<string, string>;
    liveNow: vue.Ref<boolean, boolean>;
    liveNowTickCount: vue.Ref<number, number>;
    refresh: vue.Ref<string, string>;
    isRefreshing: vue.Ref<boolean, boolean>;
    autoRefreshTickCount: vue.Ref<number, number>;
    setRefresh: (interval: string) => void;
    saving: vue.Ref<boolean, boolean>;
    saveError: vue.Ref<string | null, string | null>;
    panels: vue.ComputedRef<PanelModel[]>;
    layout: vue.ComputedRef<GridLayoutItem[]>;
    title: vue.ComputedRef<string>;
    scene: vue.ComputedRef<__.SceneNode | null>;
    loadByUid: (uid: string) => Promise<void>;
    loadLocal: (raw: Record<string, unknown>) => Promise<void>;
    refreshPanel: (panel: PanelModel) => Promise<void>;
    setPanelVisible: (panelId: number, visible: boolean) => void;
    visiblePanels: vue.Ref<Set<number> & Omit<Set<number>, keyof Set<any>>, Set<number> | (Set<number> & Omit<Set<number>, keyof Set<any>>)>;
    refreshAllPanels: () => Promise<void>;
    canEditDashboard: () => boolean;
    setEditMode: (v: boolean) => void;
    updateLayout: (next: GridLayoutItem[]) => void;
    updatePanel: (panel: PanelModel) => void;
    addPanel: (type?: string) => number | undefined;
    deletePanel: (panelId: number) => void;
    seedPanelData: (panelId: number, data: PanelData) => void;
    save: () => Promise<void>;
    setPersistenceHandler: (handler: GrafanaDashboardPersistence | null) => void;
    restoreSaved: () => Promise<void>;
    setTime: (from: string, to: string) => void;
    getTimeRange: () => TimeRange;
    getPanelTimeOverride: (panel: PanelModel) => PanelTimeOverrideResult;
    getRefreshIntervals: () => string[];
    getQuickRanges: () => Array<{
        label: string;
        from: string;
        to: string;
    }> | null;
    isTimepickerHidden: () => boolean;
    getNowDelayMs: () => number;
    getFiscalYearStartMonth: () => number;
    setTimezone: (tz: string) => void;
    setWeekStart: (next: string) => void;
    setLiveNow: (on: boolean) => void;
    registerDataSource: (ds: DataSourceApi) => void;
    unregisterDataSource: (uid: string) => void;
    setEmbeddedDatasources: (list: EmbeddedDatasource[]) => void;
    applyDocumentEmbeddedDatasources: () => void;
    dispose: () => void;
    serializeDocument: () => string;
    scheduler: QueryScheduler;
    undo: () => void;
    redo: () => void;
    canUndo: vue.Ref<boolean, boolean>;
    canRedo: vue.Ref<boolean, boolean>;
    refreshVariables: (trigger?: VariableRefreshTrigger) => Promise<void>;
    syncVariablesFromLocation: () => void;
    syncVariablesToLocation: () => void;
    pushHistory: () => void;
    annotationEvents: vue.Ref<{
        time: number;
        timeEnd?: number | undefined;
        title: string;
        text?: string | undefined;
        tags?: string[] | undefined;
        color?: string | undefined;
    }[], AnnotationEvent[] | {
        time: number;
        timeEnd?: number | undefined;
        title: string;
        text?: string | undefined;
        tags?: string[] | undefined;
        color?: string | undefined;
    }[]>;
    selectedPanelIds: vue.Ref<number[], number[]>;
    refreshAnnotations: () => Promise<void>;
    setVariable: (name: string, value: string | string[]) => void;
    updateVariables: (list: any[]) => void;
    copySelectedPanel: (panelId: number) => void;
    pasteClipboardPanel: () => void;
    duplicateSelectedPanel: (panelId: number) => void;
    setSelectedPanels: (ids: number[]) => void;
    saveSelectedAsLibraryPanel: (panelId: number, name?: string) => __.LibraryPanel | null;
    unlinkLibraryPanel: (panelId: number) => void;
    addLibraryPanelToDashboard: (uid: string) => void;
    listSavedLibraryPanels: () => __.LibraryPanel[];
}, "dispose" | "save" | "registerDataSource" | "unregisterDataSource" | "copySelectedPanel" | "pasteClipboardPanel" | "duplicateSelectedPanel" | "setSelectedPanels" | "saveSelectedAsLibraryPanel" | "unlinkLibraryPanel" | "addLibraryPanelToDashboard" | "listSavedLibraryPanels" | "setRefresh" | "loadByUid" | "loadLocal" | "refreshPanel" | "setPanelVisible" | "refreshAllPanels" | "canEditDashboard" | "setEditMode" | "updateLayout" | "updatePanel" | "addPanel" | "deletePanel" | "seedPanelData" | "setPersistenceHandler" | "restoreSaved" | "setTime" | "getTimeRange" | "getPanelTimeOverride" | "getRefreshIntervals" | "getQuickRanges" | "isTimepickerHidden" | "getNowDelayMs" | "getFiscalYearStartMonth" | "setTimezone" | "setWeekStart" | "setLiveNow" | "setEmbeddedDatasources" | "applyDocumentEmbeddedDatasources" | "serializeDocument" | "undo" | "redo" | "refreshVariables" | "syncVariablesFromLocation" | "syncVariablesToLocation" | "pushHistory" | "refreshAnnotations" | "setVariable" | "updateVariables">>;

/**
 * DashboardPage — thin composition root (Task 6A).
 * Owns props/emits, store wiring, and high-level layout only.
 * Action logic lives in dashboardPage/* factories.
 */
type __VLS_Props$a = {
    uid?: string;
    solo?: boolean;
    embedded?: boolean;
    editPanelId?: number;
    viewPanelId?: number;
    inspectPanelId?: number;
    inspectTab?: string;
    /** Optional page-scoped locale override (accepts zh-Hans/zh-CN/en-US/en). */
    locale?: string;
};
declare const __VLS_export$a: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    cancel: () => any;
    back: () => any;
    "request-mode": (mode: GrafanaDashboardMode) => any;
    saved: (dashboard: Record<string, unknown>) => any;
    "save-error": (message: string) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
    onCancel?: (() => any) | undefined;
    onBack?: (() => any) | undefined;
    "onRequest-mode"?: ((mode: GrafanaDashboardMode) => any) | undefined;
    onSaved?: ((dashboard: Record<string, unknown>) => any) | undefined;
    "onSave-error"?: ((message: string) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$a: typeof __VLS_export$a;

type __VLS_Props$9 = {
    panels: PanelModel[];
    panelData: Record<number, PanelData>;
    editable?: boolean;
    /** Full-canvas view mode for single panel */
    isViewing?: boolean;
    colNum?: number;
    rowHeight?: number;
    selectedPanelId?: number | null;
    replaceVariables?: (value: string) => string;
    /**
     * Grafana dashboard.graphTooltip:
     * 0 Off | 1 shared crosshair | 2 shared tooltip.
     */
    graphTooltip?: number;
};
declare const __VLS_export$9: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    layoutUpdated: (args_0: GridLayoutItem[]) => any;
    panelClick: (args_0: number) => any;
    toggleRow: (args_0: number) => any;
    panelAction: (args_0: PanelAction) => any;
    visibilityChange: (args_0: number[]) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{
    onLayoutUpdated?: ((args_0: GridLayoutItem[]) => any) | undefined;
    onPanelClick?: ((args_0: number) => any) | undefined;
    onToggleRow?: ((args_0: number) => any) | undefined;
    onPanelAction?: ((args_0: PanelAction) => any) | undefined;
    onVisibilityChange?: ((args_0: number[]) => any) | undefined;
}>, {
    editable: boolean;
    graphTooltip: number;
    isViewing: boolean;
    replaceVariables: (value: string) => string;
    colNum: number;
    rowHeight: number;
    selectedPanelId: number | null;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$9: typeof __VLS_export$9;

type __VLS_Props$8 = {
    open: boolean;
    uid: string;
    slug?: string;
    from?: string;
    to?: string;
    panelId?: number;
    /** Grafana shareView: link | embed | snapshot */
    shareView?: ShareView;
};
declare const __VLS_export$8: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$8: typeof __VLS_export$8;

type __VLS_Props$7 = {
    open: boolean;
    panel?: PanelModel | null;
    data?: PanelData;
    initialTab?: string;
};
declare const __VLS_export$7: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$7: typeof __VLS_export$7;

type PanelEditorVariable = {
    name?: string;
    type?: string;
    label?: string;
    current?: unknown;
    options?: unknown[];
    multi?: boolean;
};
type __VLS_Props$6 = {
    panel: PanelModel;
    data?: PanelData;
    /** Dashboard template variables — drives DataLinks suggestions (Grafana link_srv) */
    variables?: PanelEditorVariable[];
    /**
     * When provided, session.workingPanel is the sole draft owner (design .
     * Standalone usage (tests) still clones panel into a local draft.
     */
    session?: PanelEditSession | null;
};
declare function getDraft(): PanelModel;
declare function markSaved(panel?: PanelModel): void;
declare const __VLS_export$6: vue.DefineComponent<__VLS_Props$6, {
    getDraft: typeof getDraft;
    markSaved: typeof markSaved;
    draftDirty: vue.ComputedRef<boolean>;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    back: (args_0: PanelModel, args_1: PanelData | undefined) => any;
    discard: () => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{
    onBack?: ((args_0: PanelModel, args_1: PanelData | undefined) => any) | undefined;
    onDiscard?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$6: typeof __VLS_export$6;

type __VLS_Props$5 = {
    open: boolean;
};
declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    add: (uid: string) => any;
    "update:open": (args_0: boolean) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{
    onAdd?: ((uid: string) => any) | undefined;
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$5: typeof __VLS_export$5;

/**
 * DashboardImportModal — the import wizard hosted in a GModal instead of the
 * /dashboard/import route. Same wizard steps (upload → options → datasources
 * → preview); on finish emits `imported` with the saved record so the page
 * can load/navigate without leaving the dashboard.
 */
type __VLS_Props$4 = {
    open: boolean;
};
declare const __VLS_export$4: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    "update:open": (args_0: boolean) => any;
    imported: (rec: {
        uid: string;
        title: string;
        raw: Record<string, unknown>;
    }) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
    "onUpdate:open"?: ((args_0: boolean) => any) | undefined;
    onImported?: ((rec: {
        uid: string;
        title: string;
        raw: Record<string, unknown>;
    }) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$4: typeof __VLS_export$4;

/**
 * Port of Grafana OptionSearchEngine (title/description/category rank).
 * @see grafana-main/public/app/features/dashboard/components/PanelEditor/state/OptionSearchEngine.ts
 */

type AnyOptionDesc = OptionDescriptor | FieldConfigDescriptor;

/**
 * Grafana getRecentOptions parity — popular ranks for common field/panel options.
 * @see grafana-main/.../PanelEditor/state/getRecentOptions.ts
 */

type AnyDesc$1 = OptionDescriptor | FieldConfigDescriptor;
declare function getRecentOptions(descriptors: AnyDesc$1[]): AnyDesc$1[];

type AnyDesc = OptionDescriptor | FieldConfigDescriptor;
type __VLS_Props$3 = {
    options: Record<string, unknown>;
    descriptors: AnyDesc[];
    mode?: 'all' | 'overrides';
    /** When true, treat root as fieldConfig.defaults */
    fieldMode?: boolean;
    /** Optional frame field names for field-name editor */
    fieldNames?: string[];
    /** Rich field options (display name + type) for FieldNamePicker */
    fieldNameOptions?: FieldNameOption[];
    /** Panel data frames for DataLinks suggestions */
    dataFrames?: DataFrame[];
    /** Dashboard template variable names for DataLinks */
    templateVars?: string[];
    /** Nested template var property paths (Grafana getVariableValueProperties) */
    templateVarProperties?: Record<string, string[]>;
};
declare function isKnownEditor(editor: unknown): boolean;
declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {
    filtered: vue.ComputedRef<AnyOptionDesc[]>;
    byCategory: vue.ComputedRef<[string, AnyDesc[]][]>;
    listMode: vue.Ref<"all" | "overrides" | "recent", "all" | "overrides" | "recent">;
    getRecentOptions: typeof getRecentOptions;
    isKnownEditor: typeof isKnownEditor;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    replace: (args_0: Record<string, unknown>) => any;
    change: (path: string, value: unknown) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
    onReplace?: ((args_0: Record<string, unknown>) => any) | undefined;
    onChange?: ((path: string, value: unknown) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$3: typeof __VLS_export$3;

/**
 * Panel frame links (panel.links) — resolve + filter for chrome title items.
 * @see refs/grafana-main PanelLinks.tsx / getScenePanelLinksSupplier
 */

type PanelLinkModel = {
    title?: string;
    url?: string;
    targetBlank?: boolean;
    /** keepTime / includeVars may appear in some exporters; resolve via tokens in url */
    keepTime?: boolean;
    includeVars?: boolean;
};

type __VLS_Props$2 = {
    title?: string;
    description?: string;
    /** Raw panel.links (host resolves for chrome). */
    links?: PanelLinkModel[] | null;
    loading?: boolean;
    error?: string;
    noData?: boolean;
    noDataText?: string;
    transparent?: boolean;
    width?: number;
    height?: number;
    panelType?: string;
    panelId?: string | number;
    scenario?: string;
    editable?: boolean;
    /** When true, skip panel body padding (parity content-box capture). */
    forceNoPadding?: boolean;
    canEdit?: boolean;
    isEditing?: boolean;
    isViewing?: boolean;
    isLibraryPanel?: boolean;
    /** When set, host resolves plugin.panel unless #default slot is used. */
    panel?: Component;
    data?: PanelData;
    options?: Record<string, unknown>;
    fieldConfig?: unknown;
    timeRange?: PanelData['timeRange'];
    replaceVariables?: (v: string) => string;
    panelContext?: Partial<PanelContext>;
};
declare var __VLS_36: {
    width: number | undefined;
    height: number | undefined;
    data: PanelData | undefined;
    options: Record<string, unknown>;
    fieldConfig: {
        defaults: any;
        overrides: any;
    };
};
type __VLS_Slots = {} & {
    default?: (props: typeof __VLS_36) => any;
};
declare const __VLS_base: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    action: (args_0: PanelAction) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
    onAction?: ((args_0: PanelAction) => any) | undefined;
}>, {
    editable: boolean;
    transparent: boolean;
    canEdit: boolean;
    isEditing: boolean;
    isViewing: boolean;
    replaceVariables: (v: string) => string;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const __VLS_export$2: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default$2: typeof __VLS_export$2;

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

type DashboardDocumentCommand = {
    type: 'replace';
    document: DashboardModel;
} | {
    type: 'upsert-panel';
    panel: PanelModel;
} | {
    type: 'remove-panel';
    panelId: number;
} | {
    type: 'set-time';
    from: string;
    to: string;
} | {
    type: 'set-timezone';
    timezone: string;
} | {
    type: 'set-refresh';
    refresh: string;
} | {
    type: 'set-variables';
    list: unknown[];
} | {
    type: 'set-annotations';
    list: unknown[];
} | {
    type: 'patch';
    mutator: (doc: DashboardModel) => DashboardModel;
};
interface DashboardDocumentState {
    document: DashboardModel | null;
    baselineJson: string;
    /** Hot-path dirty: mutationRevision !== savedRevision (Task 12/15). */
    dirty: boolean;
    mutationRevision: number;
    savedRevision: number;
    canUndo: boolean;
    canRedo: boolean;
}
interface DashboardDocumentDispatchOptions {
    /** When false, mutates document without undo stack (variable refresh, ephemeral time preview). Default true. */
    history?: boolean;
    /** When false, do not mark dirty. Default true for non-replace commands. */
    dirty?: boolean;
}
interface DashboardDocument {
    readonly state: DashboardDocumentState;
    load(document: DashboardModel): void;
    dispatch(command: DashboardDocumentCommand, opts?: DashboardDocumentDispatchOptions): DashboardDocumentState;
    undo(): DashboardDocumentState;
    redo(): DashboardDocumentState;
    markSaved(document?: DashboardModel): DashboardDocumentState;
    /** Replace working document without resetting undo baseline (in-place editor mutations). */
    syncWorking(document: DashboardModel): DashboardDocumentState;
    /** Push current working document as an undo tip without changing baseline JSON. */
    recordHistoryTip(baselineJson?: string): DashboardDocumentState;
    snapshot(): string;
    resetHistory(): void;
}
declare function createDashboardDocument(initial?: DashboardModel | null): DashboardDocument;
declare function allocatePanelId(doc: DashboardModel | null | undefined): number;

interface PanelModelLike {
    id?: number;
    targets?: DataQuery[];
    datasource?: DataQuery['datasource'] | string | null;
    transformations?: unknown[];
    fieldConfig?: unknown;
    options?: unknown;
    title?: string;
    type?: string;
}
interface PanelQueryContext {
    timeRange: TimeRange;
    scopedVars?: Record<string, unknown>;
    requestId: string;
    maxDataPoints?: number;
    intervalMs?: number;
    queryCachingTTL?: number;
    cacheTimeout?: string;
    visible?: boolean;
    onPartialData?: (series: _grafana_data.DataFrame[]) => void;
}
interface PanelQueryEngine {
    execute(panel: PanelModelLike, context: PanelQueryContext, signal: AbortSignal): Promise<PanelData>;
}
interface CreatePanelQueryEngineOptions {
    scheduler: QueryScheduler;
    resolveDataSource: (ref: unknown) => DataSourceApi;
    postProcess?: (data: PanelData, panel: PanelModelLike, ctx: PanelQueryContext) => PanelData | Promise<PanelData>;
}
declare function createPanelQueryEngine(opts: CreatePanelQueryEngineOptions): PanelQueryEngine;

type __VLS_Props$1 = {
    dashboard: Record<string, unknown>;
    datasources?: DashboardViewerDatasource[];
    theme?: 'light' | 'dark' | 'system';
    readonly?: boolean;
};
declare function getJson(): Record<string, unknown>;
declare function getJsonString(): string;
declare const __VLS_export$1: vue.DefineComponent<__VLS_Props$1, {
    getJson: typeof getJson;
    getJsonString: typeof getJsonString;
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    error: (args_0: string) => any;
    ready: () => any;
    submit: (json: Record<string, unknown>) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
    onError?: ((args_0: string) => any) | undefined;
    onReady?: (() => any) | undefined;
    onSubmit?: ((json: Record<string, unknown>) => any) | undefined;
}>, {
    datasources: DashboardViewerDatasource[];
    readonly: boolean;
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default$1: typeof __VLS_export$1;

type __VLS_Props = {
    dashboard: Record<string, unknown>;
    mode: GrafanaDashboardMode;
    persist: GrafanaDashboardPersistence;
    datasources?: DashboardViewerDatasource[];
    theme?: 'light' | 'dark' | 'system';
    /** Optional locale override forwarded to the embedded DashboardPage. */
    locale?: string;
};
declare const __VLS_export: vue.DefineComponent<__VLS_Props, GrafanaDashboardExposed, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
    error: (error: GrafanaDashboardError) => any;
    ready: () => any;
    cancel: () => any;
    back: () => any;
    saved: (dashboard: Record<string, unknown>) => any;
    "update:mode": (mode: GrafanaDashboardMode) => any;
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
    onError?: ((error: GrafanaDashboardError) => any) | undefined;
    onReady?: (() => any) | undefined;
    onCancel?: (() => any) | undefined;
    onBack?: (() => any) | undefined;
    onSaved?: ((dashboard: Record<string, unknown>) => any) | undefined;
    "onUpdate:mode"?: ((mode: GrafanaDashboardMode) => any) | undefined;
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;

declare function resolvePanelCompatibility(panelId: string): PanelCompatibilityEntry;
declare const OBSERVABILITY_CAPABILITY_MANIFEST: {
    version: 1;
    sources: DatasourceCapabilityManifest[];
    panels: PanelCompatibilityEntry[];
    scenarios: ObservabilityCapabilityScenario[];
};
declare function getManifestForDatasourceType(type: string): DatasourceCapabilityManifest | undefined;
/** Build a dashboard JSON that enumerates capability scenarios (no live queries). */
declare function buildObservabilityCapabilitiesDashboard(): Record<string, unknown>;

export { _default$9 as DashboardGrid, DashboardHistory, _default$4 as DashboardImportModal, _default$a as DashboardPage, _default$1 as DashboardViewer, _default as GrafanaDashboard, _default$5 as LibraryPanelsDrawer, OBSERVABILITY_CAPABILITY_MANIFEST, _default$3 as OptionsPane, _default$6 as PanelEditor, _default$2 as PanelHost, _default$7 as PanelInspector, _default$8 as ShareDrawer, allocatePanelId, applyAdhocFiltersToExpr, applyDatasourceMappings, applyLayoutToPanels, applyLibraryModelToInstance, applyPanelTypeChange, applyTimeToScene, applyVariablesFromUrl, assertBackupRoundTrip, backToDashboard, buildDashboardJsonExport, buildEmbedHtml, buildFullInspectorView, buildImportPreview, buildInspectorSnapshot, buildObservabilityCapabilitiesDashboard, buildPanelEditQuery, buildPublicDashboardPath, buildRenderUrl, buildSceneGraph, buildScopedVars, buildShareUrl, buildSnapshotExport, buildVariableDependencyGraph, captureDomScreenshot, captureScreenshot, clearClipboard, clearLibraryPanels, collectAdhocFilters, collectDatasourceRefPaths, collectDomStructureSeed, collides, commitImport, copyPanel, createDashboardDocument, createEmptyDashboardJson, createImportWizardState, createPanelEditSession, createPanelEditorState, createPanelQueryEngine, dashboardSaved, detectVariableCycles, discard, dispatch as dispatchPanelEditCommand, dispose as disposePanelEditSession, duplicatePanel, emptyAnnotationFrame, encodeVariablesToUrl, exclusiveEditViewQuery, exitBack, exitDiscard, expandRepeats, exportDashboard, exportInspectorCsv, exportInspectorJson, extractInputsFromDashboard, extractVariableRefs, findOpenPosition, findSceneNode, flattenPanels, formatVariableValue, getImportedDashboard, getLibraryPanel, getManifestForDatasourceType, hasClipboardPanel, hashPanelPipelineSeries, instantiateLibraryPanel, interpolateWithAdhoc, isEditorExitNavigation, isRowPanel, layoutToGridPos, listImportedDashboards, listLibraryPanels, listVisualizationOptions, loadDashboardDocument, movePanelByKeyboard, mutate as mutatePanelEditSession, nextPanelId, normalizeImportPayload, notifyParentDashboardReady, nudgeSelection, openPanelEditSession, panelsToLayout, parsePanelEditRoute, parseWizardPayload, parseWizardPayloadAsync, pastePanel, patchDraftFieldDefaults, patchDraftOption, peekClipboardPanel, pixelDiffRatio, pixelDiffRatioFromDataUrls, placeholderScreenshot, redactSecrets, refreshAllVariables, refreshImportPreview, refreshVariableOptions, removeImportedDashboard, removePanel, replaceVariables, resizePanelByKeyboard, resolveIntervalVariable, resolvePanelCompatibility, roundTripDashboard, runAnnotationQueries, runPanelDataPipeline, runPanelDataPipelineAsync, saveDashboardWhileEditing, saveImportedDashboard, saveLibraryPanel$1 as saveLibraryPanel, saveLibraryPanel as saveLibraryPanelInSession, selectRange, serializeDashboardDocument, setDraftQueries, setDraftTransformations, setVariableValue, shouldOpenEditSession, structuralPixelBuffer, syncLibraryPanelInstances, toggleSelection, unlinkLibraryPanel$1 as unlinkLibraryPanel, unlinkLibraryPanel as unlinkLibraryPanelInSession, updateLibraryPanelFromInstance, updatePanelFieldConfig, updatePanelOption, upsertPanel, useDashboardStore, v1ToV2, v2ToV1, variableRefreshOrder };
export type { AdHocFilter, AnnotationEvent, BackResult, DashboardDocument, DashboardDocumentCommand, DashboardDocumentState, DashboardExportOptions, DashboardV2, DashboardViewerDatasource, DashboardViewerExposed, DatasourceMapping, DiscardResult, ExitBackResult, ExitDiscardResult, FullInspectorView, GrafanaDashboardError, GrafanaDashboardExposed, GrafanaDashboardMode, GrafanaDashboardPersistence, GridLayoutItem, ImportInput, ImportWizardState, ImportWizardStep, ImportedDashboardRecord, InspectorSnapshot, LibraryPanel, PanelEditCommand, PanelEditEffect, PanelEditHostState, PanelEditPhase, PanelEditRouteLocation, PanelEditRouteState, PanelEditSession, PanelEditorState, PanelModelLike, PanelPipelineInput, PanelPipelineResult, PanelQueryContext, PanelQueryEngine, SceneNode, SceneNodeKind, ScreenshotRequest, ScreenshotResult, ShareOptions, ShareView };

// ----- @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<{
        id?: string;
        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>>>;
    /**
     * Global (server-wide) user macros. Zabbix distinguishes these from host
     * macros via `globalmacro: true` on usermacro.get — mirrors grafana-zabbix
     * ZabbixAPIConnector.getGlobalMacros, used as the fallback when a host macro
     * is not defined during {$MACRO} expansion in problem text.
     */
    getGlobalMacros(signal?: AbortSignal): Promise<Array<Record<string, unknown>>>;
    getValueMaps(signal?: AbortSignal): Promise<ZabbixPagedResult<Record<string, unknown>>>;
    getCurrentUser(signal?: AbortSignal): Promise<{
        userid: string;
        type?: string;
        roleid?: string;
    }>;
    /**
     * Resolve acknowledge authors. Zabbix selectAcknowledges only returns userid,
     * so the panel joins these rows to show the person who acknowledged — mirrors
     * grafana-zabbix getUsers() + formatAcknowledges.
     */
    getUsers(signal?: AbortSignal): Promise<Array<Record<string, unknown>>>;
    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: _grafana_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;
        expandable: false;
    }[]>;
    annotationQuery: (request: {
        range: TimeRange;
        annotation: Record<string, unknown>;
    }, signal?: AbortSignal) => Promise<_grafana_data.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_I18N_ZH_HANS: Record<string, string>;
declare const ZABBIX_I18N_EN_US: Record<string, string>;
declare const ZABBIX_I18N_KEYS: readonly string[];
declare function registerZabbixI18nCatalogs(): void;
/** Localized lookup with lightweight `{name}` interpolation. */
declare function zabbixT(key: string, vars?: Record<string, unknown>): string;

declare const ZABBIX_CAPABILITY_MANIFEST: {
    readonly datasourceType: "alexanderzobnin-zabbix-datasource";
    readonly displayName: "Zabbix";
    readonly configSections: [{
        readonly id: "connection";
        readonly name: string;
        readonly fields: ["url", "timeout", "queryTimeout"];
        readonly required: true;
    }, {
        readonly id: "auth";
        readonly name: string;
        readonly fields: ["authType", "authPlacement", "runtimeCredential"];
        readonly required: true;
    }, {
        readonly id: "cache";
        readonly name: string;
        readonly fields: ["cacheTTL", "trends", "trendsFrom", "trendsRange"];
    }, {
        readonly id: "limits";
        readonly name: string;
        readonly fields: ["historyMaxPoints", "metadataPageSize", "itemLimit"];
    }, {
        readonly id: "directDb";
        readonly name: "Direct DB";
        readonly fields: ["dbConnectionDatasourceUid", "dbConnectionDatasourceType"];
    }, {
        readonly id: "writes";
        readonly name: string;
        readonly fields: ["enableWrites", "acknowledge", "scriptExecute"];
    }];
    readonly profiles: [{
        readonly id: "default";
        readonly name: string;
        readonly signals: ["metrics", "logs", "problems", "events"];
        readonly queryModes: ["0", "1", "2", "3", "4", "5", "6", "lld"];
    }];
    readonly queryModes: [{
        readonly id: "0";
        readonly name: string;
        readonly signal: "metrics";
        readonly notes: string;
    }, {
        readonly id: "1";
        readonly name: string;
        readonly signal: "metrics";
    }, {
        readonly id: "2";
        readonly name: string;
        readonly signal: "logs";
    }, {
        readonly id: "3";
        readonly name: "Item ID";
        readonly signal: "metrics";
    }, {
        readonly id: "4";
        readonly name: string;
        readonly signal: "events";
    }, {
        readonly id: "5";
        readonly name: string;
        readonly signal: "problems";
    }, {
        readonly id: "6";
        readonly name: string;
        readonly signal: "events";
    }, {
        readonly id: "lld";
        readonly name: string;
        readonly signal: "metrics";
        readonly notes: string;
    }, {
        readonly id: "annotation";
        readonly name: string;
        readonly signal: "events";
    }, {
        readonly id: "variable";
        readonly name: string;
        readonly signal: "events";
    }];
    readonly dataKinds: [{
        readonly id: "zabbix.history.numeric";
        readonly name: string;
        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: string;
        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: string;
        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: string;
        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: string;
        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: string;
        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: string;
        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: string;
        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: string;
        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_I18N_EN_US, ZABBIX_I18N_KEYS, ZABBIX_I18N_ZH_HANS, ZABBIX_PANEL_ID, createZabbixDataSource, registerZabbixI18nCatalogs, registerZabbixPlugin, sanitizeProblemHtml, zabbixT };

// ----- @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';
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 (only v5 wire envelope; argus-v5 was removed). */
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: "signoz-v5";
        readonly name: "SigNoz v5（原生）";
        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: "指标查询构建器";
        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: "指标 ClickHouse SQL";
        readonly signal: "metrics";
        readonly requestTypes: ["time_series", "scalar", "raw"];
    }, {
        readonly id: "logs.builder";
        readonly name: "日志查询构建器";
        readonly signal: "logs";
        readonly requestTypes: ["time_series", "raw", "raw_stream"];
    }, {
        readonly id: "logs.raw";
        readonly name: "日志原始查询";
        readonly signal: "logs";
        readonly requestTypes: ["raw", "raw_stream"];
    }, {
        readonly id: "logs.live_tail";
        readonly name: "日志实时流";
        readonly signal: "logs";
        readonly requestTypes: ["raw_stream"];
    }, {
        readonly id: "logs.clickhouse_sql";
        readonly name: "日志 ClickHouse SQL";
        readonly signal: "logs";
        readonly requestTypes: ["raw"];
    }, {
        readonly id: "traces.builder";
        readonly name: "链路追踪查询构建器";
        readonly signal: "traces";
        readonly requestTypes: ["trace", "time_series", "raw"];
    }, {
        readonly id: "traces.raw";
        readonly name: "链路追踪原始查询 / SQL";
        readonly signal: "traces";
        readonly requestTypes: ["raw", "trace"];
    }, {
        readonly id: "service_map";
        readonly name: "服务拓扑图";
        readonly signal: "topology";
        readonly requestTypes: ["time_series"];
    }, {
        readonly id: "issues";
        readonly name: "问题 / 异常";
        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: "Line";
            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: "Line";
            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: "问题 / 异常";
        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: [];
};

/**
 * Map SigNoz v5 query_range JSON → Grafana DataFrames.
 * Shapes mirror SigNoz v5 aggregator series wire format.
 */

interface MapSignozOpts {
    refId: string;
    legendFormat?: string;
    signal?: string;
    requestType?: string;
    datasourceUid?: string;
    profile?: string;
    requestId?: string;
    experimentalDistribution?: boolean;
}

/**
 * Task 3: SigNoz unique response pipeline.
 * Thin combination of map + normalize; only one implementation.
 * Adapter, partial, final, annotation, offline fixture, Prom-compatible and local formula
 * must all share this finalizer.
 */

type ResponsePipelineOpts = Omit<MapSignozOpts, 'refId'> & {
    profileId?: string;
    refId?: string;
};
/**
 * Map SigNoz response then normalize exactly once.
 */
declare function mapAndNormalizeSignozResponse(body: unknown, profileIdOrOpts?: string | ResponsePipelineOpts, maybeOpts?: ResponsePipelineOpts): DataFrame[];
declare function responsePipeline(body: unknown, profileIdOrOpts?: string | ResponsePipelineOpts, maybeOpts?: ResponsePipelineOpts): DataFrame[];

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, mapAndNormalizeSignozResponse, registerSigNozPlugin, resolveSigNozProfile, responsePipeline };

// ----- pure surface: no bootstrap / registration helpers -----
