import { ApiResourceVisibility } from "@stigmer/protos/ai/stigmer/commons/apiresource/enum_pb";
import { type VisibilityLevelOption } from "./visibilityLevels.js";
/** How the selector presents itself and how it confirms escalations. */
export type VisibilitySelectorMode = "manage" | "create";
/** Props for {@link VisibilitySelector}. */
export interface VisibilitySelectorProps {
    /** Current visibility of the resource. */
    readonly visibility: ApiResourceVisibility;
    /**
     * Levels to offer, in escalation order (least to most exposed). Selecting
     * a level later in the list than the current one is an escalation and is
     * confirmed by severity (see {@link mode}); de-escalation applies
     * immediately (revoking access is always safe).
     */
    readonly options: readonly VisibilityLevelOption[];
    /** Called when the user selects (and, for escalations, confirms) a level. */
    readonly onVisibilityChange: (v: ApiResourceVisibility) => void;
    /**
     * Presentation + confirmation mode.
     *
     * - `"manage"` (default) — a compact current-state chip opens a popover
     *   ladder of levels. Escalations are confirmed by severity: a light
     *   inline prompt for levels carrying {@link VisibilityLevelOption.confirmPrompt}
     *   (e.g. Organization), and a blocking modal for levels carrying
     *   {@link VisibilityLevelOption.confirmDialog} (Platform, Public). This is
     *   the live-resource case.
     * - `"create"` — an inline radio list that applies immediately, with no
     *   escalation confirmation. Used to pick an initial value while creating
     *   a resource (typically inside a native `<dialog>`, where a portaled
     *   popover would render beneath the modal's top layer).
     *
     * @default "manage"
     */
    readonly mode?: VisibilitySelectorMode;
    /** Shows a spinner/disabled state while the RPC is in flight. */
    readonly isPending?: boolean;
    /** Disables all interaction (e.g., when the user lacks can_edit). */
    readonly disabled?: boolean;
    /** Accessible name for the control. Defaults to "Resource visibility". */
    readonly ariaLabel?: string;
    /** Additional CSS classes applied to the root element. */
    readonly className?: string;
}
/**
 * The single control for resource visibility across blueprints AND
 * instances. Offered levels are pure data ({@link VisibilityLevelOption});
 * per-kind level sets live in `visibilityLevels.ts`, so this component
 * carries no kind-specific logic.
 *
 * In `"manage"` mode it renders a current-state chip (icon + label + caret)
 * that opens a popover listing each offered level with its own description —
 * scaling cleanly to four levels without the layout shift of a segmented
 * control, and explaining every choice at a glance (Recognition over
 * Recall). Escalation is confirmed in proportion to how far access expands:
 * de-escalation applies instantly, an Organization escalation shows a light
 * inline prompt, and Platform/Public escalations open a blocking
 * {@link ConfirmDialog} that names the exact audience. Confirmation is owned
 * here so every consumer — blueprint detail, instance detail, and any
 * standalone embed — behaves identically.
 *
 * In `"create"` mode it renders an inline radio list that applies
 * immediately (initial value selection has no escalation semantics).
 *
 * If the current visibility is not among the offered options (e.g. a
 * platform-shared blueprint whose org no longer operates an
 * IdentityProvider), its canonical option is rendered in place so the
 * state stays legible and the user can still move to an offered level.
 *
 * All visual properties flow through `--stgm-*` design tokens; portaled
 * content targets the {@link useStigmerPortalContainer} so it inherits the
 * active theme.
 *
 * @example
 * ```tsx
 * <VisibilitySelector
 *   visibility={agent.metadata.visibility}
 *   options={blueprintVisibilityLevels({ deploymentMode, hasIdentityProvider })}
 *   onVisibilityChange={updateVisibility}
 *   isPending={isPending}
 * />
 * ```
 */
export declare function VisibilitySelector({ visibility, options, onVisibilityChange, mode, isPending, disabled, ariaLabel, className, }: VisibilitySelectorProps): import("react/jsx-runtime").JSX.Element;
/**
 * Read-only visibility indicator with a matching icon, covering all four
 * levels (Private / Organization / Platform / Public).
 *
 * Rendered wherever the interactive {@link VisibilitySelector} is not
 * available — for viewers who lack `can_edit`, and while a permission check
 * is in flight — so a resource's visibility is always legible rather than
 * silently blank. Shares the chip styling with the selector trigger so the
 * read-only and editable states are visually consistent.
 */
export declare function VisibilityBadge({ visibility, className, }: {
    readonly visibility: ApiResourceVisibility;
    readonly className?: string;
}): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=VisibilitySelector.d.ts.map