import * as react_jsx_runtime from 'react/jsx-runtime';
export { KeyMetricsContextValue, KeyMetricsProvider, useKeyMetricsContext } from './key-metrics-context.js';
import 'react';

/**
 * Whether an **up** arrow should read as “good news” for tinting and assistive text.
 * - **`higher_is_better`** (default) — revenue, pass rate, approved count: up = favorable.
 * - **`lower_is_better`** — defects, overdue, **low PBI / quality flags**: more flags + up arrow = unfavorable.
 * - **`informational`** — volume or mix only; keep arrows **muted** (direction without value judgment).
 */
type MetricTrendPolarity = "higher_is_better" | "lower_is_better" | "informational";
type MetricTrendTone = "positive" | "negative" | "muted";
/** Maps `trend` + polarity to semantic tone for colours (arrow direction still follows `trend`). */
declare function metricTrendTone(trend: "up" | "down" | "neutral", polarity?: MetricTrendPolarity): MetricTrendTone;
/** Short clause for `aria-label` on the trend chip (paired with the delta string). */
declare function metricTrendAriaQualifier(trend: "up" | "down" | "neutral", polarity?: MetricTrendPolarity): string;
interface MetricItem {
    /** Unique identifier for React keying */
    id: string;
    /** Short label shown above the value */
    label: string;
    /** Displayed value — e.g. "23", "98%", "1,250" */
    value: string | number;
    /**
     * Change **count** for the trend chip — e.g. `"+5"`, `"-3"`, `"+12%"`.
     *
     * Pass an **empty string** (or `0`) when there is no comparison delta to show.
     * In that case the **trend chip is hidden entirely** (the previous `—` placeholder
     * is dropped) — see `MetricCell`. Put contextual prose like
     * `"left + right"` / `"vs last week"` in `description`, **never** here.
     */
    delta: string | number;
    /**
     * Visual trend direction (arrow follows the signed change in the underlying metric).
     * `"neutral"` paired with an empty `delta` suppresses the chip — use `description`
     * for any caption you want to show below the value instead.
     */
    trend: "up" | "down" | "neutral";
    /**
     * Optional short caption rendered **below** the value + trend row (muted, small).
     * Use for **what** the number means or **how** it breaks down
     * (e.g. `"left + right"`, `"vs last week"`, `"across 4 sites"`) — NOT for delta counts.
     */
    description?: string;
    /**
     * How to **tint** the trend chip. Omit = **`higher_is_better`** (legacy behaviour).
     * Arrows always match `trend`; sentiment colours flip for **`lower_is_better`**.
     */
    trendPolarity?: MetricTrendPolarity;
    /** Makes the cell a link */
    href?: string;
    /** Makes the cell a button */
    onClick?: () => void;
    /**
     * "hero" — primary KPI (e.g. total count): larger value, same structure as siblings.
     * "default" — standard KPI strip cell.
     */
    metricVariant?: "default" | "hero";
}
interface MetricInsight {
    /** Optional single line for custom copy; rail prefers `title` + `description` when both are set */
    statement?: string;
    /** Card headline */
    title: string;
    /** Supporting body copy */
    description?: string;
    /** Optional deep-link for the ↗ button */
    href?: string;
    /** CTA label — defaults to "Ask Leo" */
    actionLabel?: string;
    /** Font Awesome class for the CTA icon — defaults to fa-wand-magic-sparkles */
    actionIcon?: string;
    /** Callback for the CTA button */
    onAction?: () => void;
    /** Severity determines the badge colour (default: warning) */
    severity?: "warning" | "info" | "error";
}
interface PeriodOption {
    value: string;
    label: string;
}
interface KeyMetricsProps {
    /**
     * "card"  — shadcn Card with brand gradient (default)
     * "flat"  — full-width gradient band, no card chrome
     */
    variant?: "card" | "flat" | "compact";
    /** Panel title */
    title?: string;
    /** Subtitle / description below title */
    description?: string;
    /** Array of KPI items — by default split into rows of 3 */
    metrics: MetricItem[];
    /** When true, all metrics share one horizontal row (md+ and compact mobile grid) */
    metricsSingleRow?: boolean;
    /**
     * When true with `metricsSingleRow`, use a 2-column KPI grid so half-width dashboard cards
     * fit 1–4 KPIs without horizontal overflow (pair rows on md+; 2-col grid on small screens).
     * The insight rail (if any) stacks below the KPI grid instead of sitting beside it on md+.
     */
    metricsHalfWidthLayout?: boolean;
    /** Optional insight card — see `insightFullWidth` */
    insight?: MetricInsight;
    /**
     * When true, the insight sits on its own full-width row under the metrics (not a narrow side rail).
     */
    insightFullWidth?: boolean;
    /** Comparison-period options for the Select */
    periods?: PeriodOption[];
    /** Initially-selected period value */
    defaultPeriod?: string;
    /** Called with the new period value when the Select changes */
    onPeriodChange?: (period: string) => void;
    /** When false, hides the title/description/period-selector header row (default: true) */
    showHeader?: boolean;
    /**
     * Tighter insight card: one short title + line of body, no vertical filler;
     * aligns visually with a single-row KPI band.
     */
    insightCompact?: boolean;
    className?: string;
}
declare function KeyMetrics({ variant, title, description, metrics, insight, periods, defaultPeriod, onPeriodChange, showHeader, insightCompact, insightFullWidth, metricsSingleRow, metricsHalfWidthLayout, className, }: KeyMetricsProps): react_jsx_runtime.JSX.Element;
/**
 * KeyMetricsContent — renders just the metrics grid + optional insight panel.
 * No card wrapper, no header, no period selector.
 * Designed for embedding inside a ChartCard with tabOptions period tabs.
 */
declare function KeyMetricsContent({ metrics, insight, insightCompact, insightFullWidth, }: Pick<KeyMetricsProps, "metrics" | "insight" | "insightCompact" | "insightFullWidth">): react_jsx_runtime.JSX.Element;

export { KeyMetrics, KeyMetricsContent, type KeyMetricsProps, type MetricInsight, type MetricItem, type MetricTrendPolarity, type MetricTrendTone, type PeriodOption, metricTrendAriaQualifier, metricTrendTone };
