import { type ChartMode } from "../../Theme/tokens/builders/chartColorsFromTheme"; /** One organization in the switcher's list; `id` is matched against `value` to find the active one. */ export interface OrgOption { /** Unique key; compared with `value` to mark the active organization and passed to `onChange`. */ id: string | number; /** Organization display name. */ name: string; /** Optional subtitle, e.g. the user's role/designation in that org. */ role?: string; /** Optional logo image URL. Falls back to an initial-based avatar. */ logoUrl?: string; } /** Trigger size; looked up in a fixed sizeMap for height, avatar and font sizing. */ export type OrgSwitcherSize = "sm" | "md" | "lg"; /** Trigger layout: avatar + name + chevron ("full"), avatar + chevron only ("avatar"), or "auto" to switch at the `md` breakpoint. */ export type OrgSwitcherDisplay = "full" | "avatar" | "auto"; /** Session-scoped org switcher (trigger+popover) — not an admin screen; see OrganizationDetails for create/rename/delete/default. Closed prop list, no ...rest/ref on the trigger button. */ export interface OrgSwitcherProps { /** Organizations to choose from. */ organizations: OrgOption[]; /** id of the currently active organization. */ value?: string | number; /** Not fired when the clicked org already matches value — only on an actual change. */ onChange: (id: string | number, org: OrgOption) => void; /** Shows an inline spinner and disables interaction (e.g. while switching). */ isLoading?: boolean; /** Force the search box on/off. Auto-enabled when there are many orgs. */ isSearchable?: boolean; /** Org count at/above which search auto-appears. Default 6. */ searchThreshold?: number; /** Trigger styling. "ghost" suits a navbar; "outline"/"subtle" for forms. */ triggerVariant?: "ghost" | "outline" | "subtle"; /** Default "md". */ size?: OrgSwitcherSize; /** Max width of the trigger label before truncation. */ maxWidth?: string; /** Min width of the dropdown panel. */ menuMinWidth?: string; /** Shown when no org is selected. */ placeholder?: string; /** Names the trigger; the shown organization (or placeholder) is appended, so the name always holds the visible text. */ ariaLabel?: string; /** Show the role subtitle inside the dropdown rows. Default true. */ showRole?: boolean; /** "avatar" shows only the org avatar and a small chevron, name moves to the accessible name and a tooltip; "auto" is avatar below `md`, full from `md` up. Default "full". */ display?: OrgSwitcherDisplay; } export declare const AVATAR_COLORS: readonly string[]; /** Chart hues are tuned to sit apart from each other, not to carry a label. */ export declare const AVATAR_INK: string; /** Deterministic hash of the name, not random or brand-derived — same org name always gets the same fixed-palette color. */ export declare const avatarColor: (seed: string, mode?: ChartMode) => string; /** * Fallback-avatar initials, up to 2 characters. A single letter reads well for one * org but collides constantly across a real list — two orgs both starting with * "P" render the identical circle, distinguishable only by the hashed color. * A multi-word name takes one letter each word ("pixelize default" -> "PD"); a * single word takes its own first two letters ("Default1" -> "DE") so a * one-word org still gets a distinct-looking mark instead of falling back to one. */ export declare const orgInitial: (name: string) => string;