/** ******************************************************************************************************************* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with 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 { FC, PropsWithChildren, ReactElement } from 'react'; import { BreadcrumbGroupProps } from '@cloudscape-design/components/breadcrumb-group'; import { SideNavigationProps } from '@cloudscape-design/components/side-navigation'; import { SplitPanelProps as SplitPanelComponentProps } from '@cloudscape-design/components/split-panel'; import { AppLayoutProps as AppLayoutComponentProps } from '@cloudscape-design/components/app-layout'; import { NavHeaderProps } from './components/NavHeader'; import { TopNavigationProps } from '@cloudscape-design/components/top-navigation'; export type AppLayoutProps = (NavHeaderProps | { header: ReactElement; }) & ({ /** * Specifies the items to be displayed in the navigation */ navigationItems: SideNavigationProps.Item[]; } | { navigation: ReactElement; }) & { /*** * Use this slot to add the breadcrumb group component to the app layout. * If this is not provided, the AppLayout will automatically generate a breadcrumb group * based on the current url unless breadcrumbGroupHide is set to false. */ breadcrumbGroup?: ReactElement; } & { /** * The header title displayed on both TopNavigation and SideNavigation panel. */ title: string; /** * The default breadcrumb displayed for / path. */ defaultBreadcrumb?: string; /** * The available route paths. If this prop is provided, the breadcrumb will show # as href * if the href is not matched to any available route path. */ availableRoutes?: string[]; /** * If true, the breadcrumb group is not displayed at all. * */ breadcrumbGroupHide?: boolean; } & AppLayoutComponentProps; export type SplitPanelProps = Pick; export interface AppLayoutContextApi { setContentType: React.Dispatch>; setSplitPanelOpen: React.Dispatch>; setSplitPanelSize: React.Dispatch>; setSplitPanelProps: React.Dispatch>; setSplitPanelPreferences: React.Dispatch>; setNotifications: React.Dispatch>; setNavigationOpen: React.Dispatch>; setTools: React.Dispatch>; setToolsHide: React.Dispatch>; setToolsOpen: React.Dispatch>; setToolsWidth: React.Dispatch>; } export declare const AppLayoutContext: import("react").Context; /** * Provides the basic layout for all types of pages, including collapsible side navigation, tools panel, and split panel. */ declare const AppLayout: FC>; export declare const useAppLayoutContext: () => AppLayoutContextApi; export default AppLayout;