import "./act_group.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export interface ActGroupLabels { /** A hard gap: the fields an act needs before it can run, and the act. */ needs: (fields: readonly string[], act: string) => string; /** A soft gap: the fields an act would leave blank, and the act. */ blank: (fields: readonly string[], act: string) => string; /** A standing check's words refusing the act, and the act. */ refused: (words: string, act: string) => string; } /** Where an act stands in its row: the destructive verb at the left, the paper or next step at the right. */ export type ActGroupRole = "primary" | "secondary" | "danger"; export interface ActGroupAct { key: string; /** The verb — the button's words, and the act its gap line names. */ label: string; role: ActGroupRole; /** Empty fields the act needs: its line names them in the warning ink, and the button waits. */ missing?: readonly string[]; /** What the act asks is still unanswered, its fields just above the row: the button waits, and no line * names them again. */ awaits?: boolean; /** Empty fields the act would leave blank: named on a neutral line, the button still pressable. */ blank?: readonly string[]; /** A standing check's words refusing the act: said in the danger ink, and the button waits. */ refused?: string; /** The id of a standing check's line refusing the act, wherever it stands: the button waits and points * there, so the words need not repeat over the row. */ refusedBy?: string; /** The act is running. */ pending?: boolean; /** Its place's id, which a `CalloutLink` elsewhere on the screen jumps to: the act's box wears the landing * wash a moment where the link lands. */ id?: string; onPress: () => void; testID?: string; } export interface ActGroupProps extends StyleProps { /** In the author's order; the row seats them by role. */ acts: readonly ActGroupAct[]; labels?: Partial; /** The buttons share the row's width — a card that is the act's own place, where a lone verb at one end * of an empty line reads as a stray. */ fill?: boolean; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * THE ACTS OF ONE PLACE — a section's foot, a drawer's — as one row of buttons: the destructive verb * at the left, then the secondary ones, the primary last at the right. Before the press, each act states * its gaps on a line above the row: what it needs (warning, its button waits), else what it would leave * blank (neutral, its button still pressable), else the check refusing it. */ export declare function ActGroup(props: ActGroupProps): React.ReactElement>;