/*! Strand UI | MIT License | dillingerstaffing.com */ import type { JSX, VNode } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface ResultsPanelProps extends JSX.HTMLAttributes { /** The count line, in instrument voice. */ count?: string; visible?: boolean; /** `results` shows children; `empty` and `error` show the state block instead. */ state?: "results" | "empty" | "error"; stateTitle?: string; stateHint?: string; /** Retry, offered only in the error state. */ onRetry?: () => void; retryLabel?: string; /** Accessible name for the region. */ label?: string; children?: VNode | VNode[] | null; className?: string; } /** * The list an instrument returns for a query; the count is a polite live region. * * @example * {results.map((r) => )} */ export const ResultsPanel = forwardRef( ({ count, visible = true, state = "results", stateTitle, stateHint, onRetry, retryLabel = "Retry", label = "Results", children, className = "", ...rest }, ref) => ( ), ); ResultsPanel.displayName = "ResultsPanel";