import { type ReactElement } from 'react'; export interface BlockedControlProps { /** * Whether the viewer's standing is RESOLVED and refused. Never true while * a claim is still loading: rendering the refusal in that window flashes a * disabled button at everybody, including the people who may use it. */ blocked: boolean; /** Why, in one sentence. Shown on hover, and to a screen reader. */ reason: string; /** * A single control that accepts a `disabled` prop — MUI's Button, * IconButton, Switch, TextField and friends all do. */ children: ReactElement<{ disabled?: boolean; }>; /** * Let the wrapper take the full width, for a control that is `fullWidth` * or stretched by its stack. The wrapping span is otherwise as wide as its * content, which shrinks such a control the moment it is blocked. */ fullWidth?: boolean; } /** * Renders a control disabled with the reason attached, or passes it through * untouched. * * DISABLED WITH THE REASON, NOT HIDDEN. Both are defensible and the choice is * made here once rather than at every gate. Hiding leaves a reader unable to * see that the capability exists at all, and the commonest support act is * routing — "this needs someone with the super role" is an answer they can * give in one message; "I see no such button" turns into an investigation of * whether the feature shipped. * * ## Two details that are the whole reason this is shared * * The tooltip wraps a `span`, not the control: MUI does not fire pointer * events on a disabled button, so a tooltip attached directly to one never * appears — which would leave a dead button and no reason at all, the exact * failure this exists to stop. * * And the reason lands on the span as a real `aria-label`, not only inside * the Tooltip's popper: an explanation that appears only on hover says * nothing to a screen reader. On a touch device the Tooltip opens on a long * press. Not a `title` as well: MUI's Tooltip refuses one on its child (a * console error on every render of a blocked control, and two tips on * hover), and the label already carries the reason. * * Both were got right once and then copied; AGL-2113 is the precedent for * what copies do — five quota readouts grew their own phrasing and stopped * agreeing. THIS IS NOT A SECURITY BOUNDARY: the server refuses regardless * of what rendered. It exists so a console stops promising what the server * will refuse. */ export declare function BlockedControl({ blocked, reason, children, fullWidth }: BlockedControlProps): import("react").JSX.Element; export declare namespace BlockedControl { var displayName: string; var aglyn: boolean; } export default BlockedControl;