/*! * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ import { type UnsubscribeMessageSubscription } from "./tools/createMessageBus.js"; export type CloseBackdrop = () => void; export type OpenBackdropArgs = { backdropId: string; /** * The z-index the overlay renders at. A higher layer paints above a lower one no matter which opened first, so it decides the order before opening order does. */ layer: number; }; export type CloseBackdropArgs = Pick; export type BackdropStack = { /** * The ids of every open backdrop, bottom first: by layer, then by opening order. The last one is on top. The array keeps its identity until the stack changes, so it is safe to return from a `useSyncExternalStore` snapshot. */ getOpenBackdropIds: () => readonly string[]; /** * Put a backdrop on top of every open backdrop in its layer. Returns the function that takes it back off. */ openBackdrop: (args: OpenBackdropArgs) => CloseBackdrop; subscribeToOpenBackdropIds: (listener: () => void) => UnsubscribeMessageSubscription; }; /** * Create a stack of open backdrops, so stacked overlays can agree on which one paints. */ export declare const createBackdropStack: () => BackdropStack; /** * The one stack every Odyssey overlay in this bundle shares. */ export declare const defaultBackdropStack: BackdropStack; //# sourceMappingURL=backdropStack.d.ts.map