import { ImportLayoutResult, Block, Section } from "../../../models"; import { Layout, LayoutItem } from "@omnia/fx-models"; import { LayoutCanvasStore } from ".."; import { LayoutDefinitionValidationOptions } from "./LayoutDefinitionValidator"; /** * Manager to handle the layout */ export declare class LayoutManager { /** * Copies an layout and generates new ids * @param layoutItem to copy * @param ownerLayoutId is the new ownerLayoutId to set */ static copyLayout(layout: Layout, layoutId?: string): Layout; /** * Validates and repairs a JSON layout against the current canvas before it * can be applied. Import mode is the safe default for compatibility with * the original API; direct edits opt into current-layout mode explicitly. * Imports a layout and applies all the ids from the current page layout * @param pageLayoutDataString to import */ static importLayoutFromJsonString(layoutCanvasStore: LayoutCanvasStore, pageLayoutDataString: string, options?: LayoutDefinitionValidationOptions): ImportLayoutResult; /** * Updates the ownerLayoutId for all layout items and its siblings * @param layoutItem to update * @param ownerLayoutId is the new ownerLayoutId to set */ private static updateOwnerLayoutId; /** * Updates the theming id to ensure a guid * @param layoutItem */ private static updateThemingId; private static ensureRemoveDeletedBlockSettings; static getBlocksInLayoutByType(layoutItem: LayoutItem, elementName: any): Array; /** * Get a block by name * @param blockName the name of the block */ static getBlockByName(container: LayoutItem, elementName: string): LayoutItem; static ensureDelegatedSections(layoutStore: LayoutCanvasStore, delegatedSections: Record, items: LayoutItem[]): void; static ensureDelegatedSectionsForSelectedLayoutItem(layoutStore: LayoutCanvasStore, delegatedSections: Record, items: LayoutItem[]): void; }