import { Entity } from '@backstage/catalog-model'; import { GridProps } from '@material-ui/core/Grid'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { IconComponent, BackstagePlugin, ApiFactory, AppTheme } from '@backstage/core-plugin-api'; import { SignInProviderConfig } from '@backstage/core-components'; import { TranslationResource } from '@backstage/core-plugin-api/alpha'; import { ReactNode, ComponentType, PropsWithChildren } from 'react'; /** @public */ declare const EntityGridItem: (props: Omit & { entity: Entity; }) => JSX.Element; /** * Button for sidebar that signs out user * * @public */ declare const SidebarSignOutButton: (props: { icon?: IconComponent; text?: string; }) => react_jsx_runtime.JSX.Element; /** @public */ declare const SidebarLanguageSwitcher: () => react_jsx_runtime.JSX.Element | null; /** @public */ type DevAppPageOptions = { path?: string; element: JSX.Element; children?: JSX.Element; title?: string; icon?: IconComponent; }; /** * DevApp builder that is similar to the App builder API, but creates an App * with the purpose of developing one or more plugins inside it. * * @public */ declare class DevAppBuilder { private readonly plugins; private readonly apis; private readonly rootChildren; private readonly routes; private readonly sidebarItems; private readonly signInProviders; private readonly translationResources; private defaultPage?; private themes?; private languages?; private defaultLanguage?; /** * Register one or more plugins to render in the dev app */ registerPlugin(...plugins: BackstagePlugin[]): DevAppBuilder; /** * Register an API factory to add to the app */ registerApi(factory: ApiFactory): DevAppBuilder; /** * Adds a React node to place just inside the App Provider. * * Useful for adding more global components like the AlertDisplay. */ addRootChild(node: ReactNode): DevAppBuilder; /** * Adds a new sidebar item to the dev app. * * Useful for adding only sidebar items without a corresponding page. */ addSidebarItem(sidebarItem: JSX.Element): DevAppBuilder; /** * Adds a page component along with accompanying sidebar item. * * If no path is provided one will be generated. * If no title is provided, no sidebar item will be created. */ addPage(opts: DevAppPageOptions): DevAppBuilder; /** * Adds an array of themes to override the default theme. */ addThemes(themes: AppTheme[]): this; /** * Adds new sign in provider for the dev app */ addSignInProvider(provider: SignInProviderConfig): this; /** * Set available languages to be shown in the dev app */ setAvailableLanguages(languages: string[]): this; /** * Add translation resource to the dev app */ addTranslationResource(resource: TranslationResource): this; /** * Set default language for the dev app */ setDefaultLanguage(language: string): this; /** * Build a DevApp component using the resources registered so far */ build(): ComponentType>; /** * Build and render directory to #root element, with react hot loading. */ render(): void; } /** * Creates a dev app for rendering one or more plugins and exposing the touch points of the plugin. * * @public */ declare function createDevApp(): DevAppBuilder; export { DevAppBuilder, EntityGridItem, SidebarLanguageSwitcher, SidebarSignOutButton, createDevApp }; export type { DevAppPageOptions };