import type { AddonLayout } from '@asteby/metacore-sdk'; export type { AddonLayout }; interface AddonLayoutState { /** Active layout. `"shell"` (default) or `"immersive"`. */ layout: AddonLayout; /** * Imperative setter for the host or an addon-loader to mutate the active * layout. Exposed for advanced use; most callers should use * `useDeclareAddonLayout(layout)` from a route component, which scopes the * change to the route's mount lifetime. */ setLayout: (layout: AddonLayout) => void; } export interface AddonLayoutProviderProps { /** Initial layout — usually `"shell"`. */ initial?: AddonLayout; children: React.ReactNode; } /** * Wrap the host app once, above the router outlet. The provider keeps the * currently-active layout in state; addon-loader and `useDeclareAddonLayout` * mutate it from below. */ export declare function AddonLayoutProvider({ initial, children, }: AddonLayoutProviderProps): import("react").JSX.Element; /** * Read the currently-active layout. The host shell calls this and decides * whether to render its chrome. Returns `"shell"` when no provider is * mounted, so apps that have not adopted immersive addons keep working. */ export declare function useAddonLayout(): AddonLayout; /** * Imperative API — the value returned mirrors `useAddonLayout()` but also * exposes the setter for hosts that need to flip the layout outside of a * route lifecycle (e.g. a hotkey forcing kiosk mode). Most addon entries do * NOT need this; prefer `useDeclareAddonLayout`. */ export declare function useAddonLayoutControl(): AddonLayoutState; /** * Declare the layout from the addon side. Mounts the value, restores * `"shell"` on unmount. Skip when `layout` is undefined so route components * can pass `manifest.frontend?.layout` directly without branching. * * function PosEntry({ manifest }: { manifest: Manifest }) { * useDeclareAddonLayout(manifest.frontend?.layout) * return * } */ export declare function useDeclareAddonLayout(layout: AddonLayout | undefined): void; //# sourceMappingURL=addon-layout-context.d.ts.map