/*!
 * Copyright (c) 2024-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 SetStateAction } from "react";
import { bufferLatest } from "../tools/bufferLatest.js";
import { PublishMessage } from "../tools/createMessageBus.js";
import { renderReactInWebComponent } from "../web-component/renderReactInWebComponent.js";
import { UiShellProps } from "./UiShell.js";
import { UiShellNavComponentProps } from "./uiShellContentTypes.js";
export declare const optionalComponentSlotNames: Record<keyof Required<UiShellProps>["optionalComponents"], string>;
export type SlottedElements = Record<keyof Required<UiShellProps>["optionalComponents"], HTMLDivElement>;
export type RenderedUiShell = {
    closeRightSideMenu: PublishMessage<void>;
    closeSideNavMenu: PublishMessage<void>;
    setComponentProps: ReturnType<typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>>;
    slottedElements: SlottedElements;
    uiShellElement: ReturnType<typeof renderReactInWebComponent>;
} & Partial<Pick<UiShellProps, "appElement">>;
/**
 * This function renders UI Shell in a web component.
 * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.
 *
 * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.
 *
 * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.
 * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**
 */
export declare const renderUiShell: ({ appBackgroundColor, appBackgroundContrastMode, appElement: providedAppElement, appElementScrollingMode, breakpointConfig, hasStandardAppContentPadding, initialVisibleSections, onError, onRender, parentElement, sideNavBackgroundColor, sideNavBackgroundContrastColor, topNavBackgroundColor, nonce, }: {
    /**
     * Optional nonce for CSP compliance.
     */
    nonce?: string;
    /**
     * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.
     */
    onError?: () => void;
    /**
     * Notify once when React has rendered UI Shell the first time.
     */
    onRender?: (renderedUiShell: RenderedUiShell) => void;
    /**
     * HTML element used as the container for UI Shell and the App. They're siblings inside this element.
     */
    parentElement: HTMLElement;
} & Pick<UiShellProps, "appBackgroundColor" | "appBackgroundContrastMode" | "appElementScrollingMode" | "breakpointConfig" | "hasStandardAppContentPadding" | "initialVisibleSections" | "sideNavBackgroundColor" | "sideNavBackgroundContrastColor" | "topNavBackgroundColor"> & Partial<Pick<UiShellProps, "appElement">>) => {
    appElement: HTMLDivElement;
    closeRightSideMenu: PublishMessage<void>;
    closeSideNavMenu: PublishMessage<void>;
    setComponentProps: (value: SetStateAction<UiShellNavComponentProps>) => void;
    slottedElements: SlottedElements;
    uiShellElement: import("../web-component/renderReactInWebComponent.js").WebComponentClass;
};
//# sourceMappingURL=renderUiShell.d.ts.map