/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * What an element says of its status to its recipe (#1541): the builders' one * status — an event kind's status case, and a Plan item's `Plan.status` — as * the two attributes every recipe that draws one reads. A renderer sets them * and nothing else: the tone's colour, its ring and the open ring are the * recipe's. * * @packageDocumentation */ import { variant, type ValueTypeOf } from "@elaraai/east"; import type { Plan } from "@elaraai/e3-ui/internal"; /** * A status as an element draws it: the builders' one status, decoded — its words, its tone, and whether it draws as an * open ring. An event kind's status case is the same type (`Schedule.Types.Status`). */ export type DrawnStatus = ValueTypeOf; /** Each tone a status takes, as East holds it. */ declare const TONES: { readonly success: variant<"success", null>; readonly warning: variant<"warning", null>; readonly danger: variant<"danger", null>; readonly info: variant<"info", null>; readonly neutral: variant<"neutral", null>; }; /** A tone a renderer names a status of its own by: success, warning, danger, info or neutral. */ export type StatusTone = keyof typeof TONES; /** * A status a renderer says of its own — a shift's coverage, a slot that is free — as the builders' one status holds it, * its tone East's variant. * * @param label - Its words * @param tone - Its tone * @param ring - Whether it draws as an open ring, as a tentative status does; not by default * @returns The status */ export declare function drawnStatus(label: string, tone: StatusTone, ring?: boolean): DrawnStatus; /** The attributes a status sets: `data-tone`, its tone, and `data-ring` where it draws as an open ring. */ export interface StatusAttributes { "data-tone"?: string; "data-ring"?: ""; } /** * The attributes an element with a status wears: its tone as `data-tone`, and * `data-ring` where it draws as an open ring; none for an element with no * status. * * @param status - The element's status, `undefined` for none * @returns The attributes to spread on the element */ export declare function statusAttributes(status: DrawnStatus | undefined): StatusAttributes; export {}; //# sourceMappingURL=status.d.ts.map