"use client"; import * as React from "react"; import { renderActions, type ActionData } from "./data-slots"; import { RESERVED_GAP, useBottomReserve } from "./use-bottom-reserve"; import { cn } from "../lib/cn"; export interface ActionBarProps { /** What the bar is about: "3 problemi selezionati". */ title: React.ReactNode; /** A detail beside it: "1 nascosto dai filtri attivi". */ detail?: React.ReactNode; /** As in PageHeader: elements or `{ label, variant, icon }`; variant `text` * is a link-style button ("Annulla selezione"). */ actions?: Array; /** info: tinted, for what is selected. inverse: navy, for changes waiting * to be saved; the buttons inside it are repainted for the navy ground. */ tone?: "info" | "inverse"; /** "region" (named by `label` or by the title), or "status" to have what * is selected read out as it changes: the title and the detail are then a * live line, the buttons beside them are not. A bar that appears together * with its words may not be announced the first time; the count is, at * every change after that. */ role?: "region" | "status"; label?: string; /** sticky: floats at the bottom of the window while what it acts on is in * view, for a selection made far down a long list; the page puts it after * that list. In a window under 600px tall it is in the flow. static: in * the flow, above what it acts on. */ position?: "sticky" | "static"; className?: string; children?: React.ReactNode; } // On navy the buttons change sides, as in the design system: the main one is // white with navy words, the neutral one a white outline, a text button white. // The bar says it once for whatever it holds, a `