import { type IUiGranteeAsyncOptions, type IUiPickedGrantee } from "../UiGranteeAsyncPicker/UiGranteeAsyncPicker.js"; import { type IUiLabelsChecklistItem } from "../UiLabelsChecklist/UiLabelsChecklist.js"; import { type PermissionMenuLevel } from "../UiPermissionMenu/UiPermissionMenu.js"; /** * @internal */ export interface IUiAddGranteeDialogCardProps { /** Loader passed straight through to the embedded `UiGranteeAsyncPicker`. */ loadOptions: (search: string) => Promise; /** * Levels each picked grantee's menu renders disabled — the caller cannot grant a * level they do not hold themselves. Passed through to the picker. */ disabledLevels?: ReadonlyArray; /** Tooltip shown on those disabled levels. */ disabledTooltip?: string; /** * Grantees currently picked. Single source of truth — the card derives all * row state from it and emits the next list via `onSelectedGranteesChange`. */ selectedGrantees: ReadonlyArray; /** * Fires with the next list when the user picks a grantee, changes a row's * permission level, or removes a row. Consumers store the result in their * own state. */ onSelectedGranteesChange: (next: IUiPickedGrantee[]) => void; /** * Permission level used when a grantee is added from the dropdown. * Defaults to `"VIEW"`. Consumers that need a different default (e.g. * "SHARE" for owners) override here. */ initialPermissionLevel?: PermissionMenuLevel; /** * Labels the picked grantees can be scoped to. Adds a Label access drill-in to each * row's permission menu, so the scope is picked in the same step as the grant rather * than after it — unless the only labels are primary ones. Omit for objects without labels. */ labels?: ReadonlyArray; /** Fires when the user clicks the header back-arrow button. */ onBack: () => void; /** Fires when the user clicks the header X close button. */ onClose: () => void; /** Fires when the user clicks Cancel in the footer. */ onCancel: () => void; /** * Fires when the user clicks the primary Share button in the footer. The * button is disabled while no grantee has been picked. */ onShare: () => void; /** Test id forwarded to the root element. */ dataTestId?: string; } /** * Add-grantee dialog card — header ("Add users or groups", which also names the * search input) + grantee picker (search input with sectioned Groups/Users * dropdown and picked-rows list) + footer with Cancel and Add. Renders inline as a plain card. For modal behavior (portal, * backdrop, focus trap, dismiss), use `UiAddGranteeDialog` which wraps this * in `UiModalDialog`. * * The card owns the visual composition (picker layout) but no policy. The * caller controls the picked list via `selectedGrantees` / `onSelectedGranteesChange`, * and may override the initial permission level via `initialPermissionLevel`. * * @internal */ export declare function UiAddGranteeDialogCard({ loadOptions, disabledLevels, disabledTooltip, selectedGrantees, onSelectedGranteesChange, initialPermissionLevel, labels, onBack, onClose, onCancel, onShare, dataTestId, }: IUiAddGranteeDialogCardProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=UiAddGranteeDialogCard.d.ts.map