import "./checks_callout.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; interface ChecksCalloutLine { key: string; /** The check's own words, as the record states them. */ text: string; /** The line's id, so an act the check refuses points at these words rather than repeating them. */ id?: string; /** Its way there, a `CalloutLink` under its words — never a button of the callout's own: the act that clears it * by its verb ("Chuyển sửa chữa"), or the field it reads ("Đến Hạn lệnh"), and the id of the place that stands — * an act's, a field's (`FactGroupField.id`, its tab opened first in a drawer). */ resolve?: { act: string; target: string; }; } /** What a lock stops: `edits` — the record's saves and its delete — or `deletes` alone. */ export type ChecksCalloutLock = "edits" | "deletes"; /** `block` refuses an act the reader can press, by the act's label; `lock` refuses only edits or deletes, a * standing state rather than a fault; `warn` only says so. */ export type ChecksCalloutCheck = (ChecksCalloutLine & { tone: "block"; refuses?: readonly string[]; }) | (ChecksCalloutLine & { tone: "lock"; locks: ChecksCalloutLock; }) | (ChecksCalloutLine & { tone: "warn"; }); export interface ChecksCalloutLabels { /** A blocking check's description: what it stops, by the acts' labels. */ refuses: (acts: readonly string[]) => string; /** A lock's description, by what it stops. */ locks: Record; } export interface ChecksCalloutProps extends StyleProps { checks: readonly ChecksCalloutCheck[]; /** The record's work is over, so what blocks is its settled state rather than a fault: it reads in the * neutral tone under a lock. */ settled?: boolean; labels?: Partial; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * THE CHECKS THAT STAND ON A RECORD, each a title in its own words with what it means under it: what blocks * first, in the danger tone, its description naming what it refuses; then what only warns, in the warning * tone; then what locks, quiet and neutral under a lock mark, its description what that lock stops — the * record's saves and its delete, or its delete alone (a settled record's blocks among them, naming what they * refuse). A check carrying its way out links to it under its words. Mounted only while a check stands. */ export declare function ChecksCallout(props: ChecksCalloutProps): React.ReactElement>; export {};