"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { VisibilitySelector, } from "./VisibilitySelector.js";
import { INSTANCE_VISIBILITY_LEVELS } from "./visibilityLevels.js";
/**
 * Visibility selector for instances (AgentInstance, WorkflowInstance):
 * {@link VisibilitySelector} preconfigured with the instance level set
 * (Private / Organization / Public — platform is excluded by design to
 * preserve tenant isolation).
 *
 * For workflow instances, ORG visibility has cascading effects: all org
 * members automatically see all executions via FGA inheritance (zero
 * per-execution tuples needed).
 *
 * For live instances, prefer {@link ResourceVisibilityControl} (which adds
 * the read-only {@link VisibilityBadge} fallback for non-editors). This thin
 * preset is used directly when picking an initial value inside a create
 * dialog, where `mode="create"` renders an inline list instead of a popover
 * (a portaled popover would stack beneath a native `<dialog>`'s top layer).
 *
 * @example
 * ```tsx
 * const [visibility, setVisibility] = useState(
 *   ApiResourceVisibility.visibility_private,
 * );
 *
 * <InstanceVisibilitySelector
 *   mode="create"
 *   visibility={visibility}
 *   onVisibilityChange={setVisibility}
 * />
 * ```
 */
export function InstanceVisibilitySelector({ visibility, onVisibilityChange, mode, isPending = false, disabled = false, className, }) {
    return (_jsx(VisibilitySelector, { visibility: visibility, options: INSTANCE_VISIBILITY_LEVELS, onVisibilityChange: onVisibilityChange, mode: mode, isPending: isPending, disabled: disabled, ariaLabel: "Instance visibility", className: className }));
}
//# sourceMappingURL=InstanceVisibilitySelector.js.map