import { Refable, type Styleable } from "@trackunit/react-components"; export type NoDataType = "Good" | "Neutral"; export interface WidgetNoDataProps extends Refable, Styleable { /** * The type of no data state to show. * * @default "Neutral" */ type?: NoDataType; /** * The description to show in the no data state. */ description: string; } /** * WidgetNoData displays a centered empty state inside a widget when there is no data to show. * It renders an illustration and a description message. The `type` prop controls the illustration tone: * `"Good"` indicates a positive empty state (e.g., no alerts), while `"Neutral"` indicates a neutral absence of data. * * ### When to use * Use WidgetNoData when a widget's data source returns an empty result set and you want to communicate that clearly. * * ### When not to use * Do not use WidgetNoData for error states — use `WidgetError`. * Do not use it when the widget requires configuration — use `WidgetMissingConfiguration`. * * @example Neutral no-data state * ```tsx * import { WidgetNoData } from "@trackunit/react-widgets"; * * const MyWidget = ({ items }: { items: Array }) => { * if (items.length === 0) return ; * return
{items.join(", ")}
; * }; * ``` * @example Positive no-data state * ```tsx * import { WidgetNoData } from "@trackunit/react-widgets"; * * const AlertsWidget = ({ alertCount }: { alertCount: number }) => { * if (alertCount === 0) return ; * return
{alertCount} alerts
; * }; * ``` * @param {WidgetNoDataProps} props - The props for the WidgetNoData component * @returns {ReactNode} WidgetNoData component */ export declare const WidgetNoData: ({ type, description, ref, style }: WidgetNoDataProps) => import("react").JSX.Element;