import { type ReactNode } from "react"; import { type GeneralAccessValue } from "../UiGeneralAccessRadio/UiGeneralAccessRadio.js"; import { type GranteeAvatarKind } from "../UiGranteeAvatar/UiGranteeAvatar.js"; /** * Visual data for a single grantee row inside the dialog. The `controls` * slot lets the caller plug in the per-row controls (typically * `UiGranteeRowControls`). * * @internal */ export interface IUiObjectShareDialogGrantee { /** Stable identifier — used as the React key for the row. */ id: string; /** Avatar variant. */ kind: GranteeAvatarKind; /** Display name. */ name: string; /** Optional email subline. */ email?: string; /** When true, the row is visually muted to signal an in-flight save. */ isPending?: boolean; /** * Per-row controls — usually `UiGranteeRowControls`; the caller may plug in * any other trailing content (e.g. a static tag) instead. */ controls?: ReactNode; } /** * @internal */ export interface IUiObjectShareDialogCardProps { /** * Dialog heading, composed by the caller — it names the shared object's type * ("Share attribute"), which only the caller knows. */ title: string; /** Fires when the user clicks the header X button OR the footer Close button. */ onClose: () => void; /** * Optional informational note rendered right below the header — e.g. a reminder * that administrators have full access regardless of the grants listed. */ note?: ReactNode; /** Grantee rows shown inside the SHARED WITH section, in render order. */ grantees: IUiObjectShareDialogGrantee[]; /** * Placeholder shown inside the SHARED WITH section when `grantees` is empty and the * list is not loading — tells the user nobody has been granted access yet. */ emptyMessage?: ReactNode; /** * When true, skeleton rows stand in for the grantee list and the * general-access radio — set it while the access list is loading, so the * placeholders (empty list, Restricted) aren't mistaken for a real policy. */ isLoading?: boolean; /** Fires when the user clicks the + Add link in the SHARED WITH heading. */ onAddClick: () => void; /** Disables the + Add action — e.g. while the object's labels are still loading. */ isAddDisabled?: boolean; /** Selected general-access option. */ generalAccess: GeneralAccessValue; /** Fires when the user picks a different general-access option. */ onGeneralAccessChange: (value: GeneralAccessValue) => void; /** Disables the general-access radio — e.g. while the access list is still loading. */ isGeneralAccessDisabled?: boolean; /** * When true, workspace-wide access is inherited from a parent workspace and * cannot be revoked here: the Restricted option is disabled and a tooltip * explains why. */ workspaceAccessInherited?: boolean; /** * Optional slot rendered next to the "All workspace members" row — typically a * `UiGranteeRowControls` pair for the workspace-wide labels picker * and permission level. */ workspaceControls?: ReactNode; /** * Workspace-wide permission level, so the "All workspace members" description * matches the level picked in `workspaceControls`. Defaults to `VIEW`. */ workspaceLevel?: "VIEW" | "SHARE" | "EDIT"; /** * Optional error notice. When set, it replaces the grantee list and * general-access sections (which can't reflect a real policy on a failed * load), so the dialog shows why it's empty instead of a misleading * "restricted, no one has access". */ error?: ReactNode; /** Test id forwarded to the root element. */ dataTestId?: string; } /** * Object share dialog card — header, grantee list, general-access radio, * footer Close button. Renders inline as a plain card. For modal behavior * (portal, backdrop, focus trap, dismiss), use `UiObjectShareDialog` * which wraps this in `UiModalDialog`. * * @internal */ export declare function UiObjectShareDialogCard({ title, onClose, note, grantees, emptyMessage, isLoading, onAddClick, isAddDisabled, generalAccess, onGeneralAccessChange, isGeneralAccessDisabled, workspaceAccessInherited, workspaceControls, workspaceLevel, error, dataTestId, }: IUiObjectShareDialogCardProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=UiObjectShareDialogCard.d.ts.map