import "./member_profile_card.css"; import type * as React from "react"; import { type ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; /** The card's own words — see `LoticsLocale.memberProfile`. */ export interface MemberProfileLabels { role?: string; /** Row label for the member's groups — the platform's "department". */ groups?: string; joined?: string; /** Stands in for the groups VALUE when the member belongs to none. */ noGroups?: string; /** Said under the name when this person has left the organization. */ inactive?: string; /** Screen-reader name of the trigger that opens this card. It lives in this * slice rather than Peek's: the words describe the CARD. */ profile?: (name: string) => string; } /** WHAT THE CARD SAYS, without how it is styled — so `MemberPeek`, which owns * its own anatomy, can take the fields without inheriting a second part union. */ export interface MemberProfileCardFields { /** Display name. Blank falls back to the locale's unknown label, as * `MemberChip` does. */ name?: string | null; /** Avatar image URL. Absent → initials. */ image?: string | null; /** What this person signs in as — an email address for a self-managed member, * an administrator-issued name for an admin-managed one. Never labelled * "Email": for half the accounts in a workspace it is not one. */ identity?: string | null; /** * The organization role, **already translated for display** ("Quản trị * viên") — never the raw `owner`/`admin`/`member` enum, because the kit * carries no domain vocabulary and no i18n logic. * * A role is a PERMISSION level, not seniority. Pass it where it means * something; omit it (the row disappears) where it does not. */ role?: string | null; /** * The member's group names — what an org actually uses to say Sale, Kế toán, * CSKH. * * ABSENT ≠ EMPTY: `undefined` drops the row entirely (this caller was never * told), while `[]` keeps the row and says so. Collapsing the two turns "we do * not know" into "they are on no team". */ groups?: readonly string[] | null; /** * When this person joined the organization, as an ISO date or timestamp. * * A DATE, not a formatted string: it renders through `formatDate` under the * active locale, so two hosts cannot drift. Rendered as MONTH AND YEAR — the * question it answers is "is this the new person?". */ joined?: string | null; /** This person has left the organization — shows the state as a badge and * mutes the name, so a record that still names them reads as history. */ inactive?: boolean; /** ONE door to the fuller record ("View profile"). A peek that needs a second * verb wanted to be a screen. */ action?: ReactNode; /** Per-instance overrides; anything omitted comes from the active locale. */ labels?: MemberProfileLabels; } interface MemberProfileCardProps extends MemberProfileCardFields, StyleProps { ref?: React.Ref; render?: useRender.RenderProp; } /** * WHO IS THIS PERSON — a bigger avatar, their name, what they sign in as, their * role and their teams, in one card that reads identically everywhere. It is the * body `MemberPeek` reveals, and it is a component so that no two call sites * pick a different SUBSET of the fields. * * PURE: pass the fields in; this fetches nothing and knows no domain types. * * Rows appear only when their field does — a card with no role and no groups is * the correct rendering of "that is all we were told". * * ```tsx * } * /> * ``` */ export declare function MemberProfileCard(props: MemberProfileCardProps): React.ReactElement>; export {};