import "./status_chips.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type OptionValue } from "./status"; import { type StyleProps } from "./style_props"; export interface StatusChipsOption { id: string; label: string; /** The option's own colour, as the field stores it. */ color: string; /** The option's own mark, as the field stores it: drawn in the dot's place, as `Status` draws it. */ mark?: OptionValue["mark"]; /** Rows at this status. */ count: number; /** The work is over at this status, so `open` leaves it out. */ closed?: boolean; } /** `open` is every status not closed; `all` is every row; a list is the statuses picked. */ export type StatusChipsValue = "open" | "all" | readonly string[]; export interface StatusChipsLabels { /** The group's accessible name. */ label: string; open: string; all: string; } export interface StatusChipsProps extends StyleProps { options: readonly StatusChipsOption[]; value: StatusChipsValue; onChange: (next: StatusChipsValue) => void; /** What the register opens on — resting, no narrowing to wear the accent, and what clearing returns to. Default * the open work. */ opening?: StatusChipsValue; labels?: Partial; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** The menu's pick: Open or All pressed is that alone; a status pressed joins the statuses picked, and * none left is what the register opens on. */ export declare function menuChoice(held: readonly string[], next: readonly string[], opening?: StatusChipsValue): StatusChipsValue; /** The value after pressing one status: toggled within a pick, else the pick of it alone; picking none is * back to what the register opens on. */ export declare function toggleStatus(value: StatusChipsValue, id: string, opening?: StatusChipsValue): StatusChipsValue; /** Chips a status reads side by side at the most — the open chip, each status and All counted as drawn; past * that the status is one chip whose menu holds them all, so the register's controls keep one line. */ export declare const SIDE_BY_SIDE = 5; /** * THE REGISTER'S STATUS, as chips with the rows at each: the open work first, each status in its own * colour, then every row. It opens on the open work; where no status closes the work, the open work is * every row and one chip says so. More chips than {@link SIDE_BY_SIDE} — or a band's line too narrow for * them — are one chip named as the status field is, reading what is picked and its count, whose menu lists * Open, every status and All, each with its count. */ export declare function StatusChips(props: StatusChipsProps): React.JSX.Element;