import "./selection_bar.css";
import type * as React from "react";
import { useRender } from "@base-ui/react/use-render";
import { type ConfirmRequest } from "./alert";
import { type StyleProps } from "./style_props";
export interface SelectionBarProps extends StyleProps {
/** How many rows are selected — the bar shows only while > 0. */
count: number;
/**
* The WHOLE phrase, as a function of the count. A function because word ORDER
* is not shared between languages.
*/
label: (count: number) => string;
/** Clears the selection — the always-present escape. */
onClear: () => void;
/** Overrides the localized default ("Clear" / "Bỏ chọn"). */
clearLabel?: string;
/**
* The bulk action(s). Render each one THROUGH `Toolbar.Button` — `} …/>` — to join the bar's arrow-key group; a
* plain control still works and stays its own tab stop.
*/
children?: React.ReactNode;
/**
* THE DESTRUCTIVE BULK ACT — first in the acts group, `danger-secondary`, and
* confirming by construction. The count is the BAR's own, handed to `confirm`
* rather than re-derived, so the dialog cannot name a different number than
* the bar.
*/
danger?: {
/** VERB AND NOUN, as the bar's button reads it. */
label: string;
confirm: (count: number) => ConfirmRequest;
};
testID?: string;
ref?: React.Ref;
render?: useRender.RenderProp;
}
/**
* The bar for a selected SET — pinned bottom-centre while ≥1 row is selected,
* with the primary action kept RIGHTMOST: Clear is the secondary escape at the
* left edge, and the destructive act OPENS the acts group so the commit slot is
* never the delete. Lift the selection `Set` into the host; this is presentation
* only.
*
* It is a `toolbar`: a screen reader announces the group rather than four loose
* buttons, and the arrows move between the controls that register with it.
*/
export declare function SelectionBar(props: SelectionBarProps): React.ReactElement> | null;