import type { LayoutNode } from "../layout"; import type { ApplyLayoutDesignerSettingsArgs } from "./ApplyLayoutDesignerSettingsArgs"; import type { GetLayoutDesignerSettingsArgs } from "./GetLayoutDesignerSettingsArgs"; import type { LayoutDesignerSettings } from "./LayoutDesignerSettings"; /** * Gets a component's layout settings, so that they can be configured by * VertiGIS Studio App Designer. * * @param args Information about the settings being requested such as the layout * node. */ export type GetLayoutDesignerSettingsCallback = (args: GetLayoutDesignerSettingsArgs) => TSettings | Promise; /** * Applies layout settings that were modified in VertiGIS Studio App Designer * back to the layout node. * * @param args Contains the updated settings to apply, and the layout node to * update. */ export type ApplyLayoutDesignerSettingsCallback = (args: ApplyLayoutDesignerSettingsArgs) => void | Promise; /** * Values for visibility attributes in layouts. */ export type Visibility = "hidden" | "visible" | "default"; /** * Default implementation of `ApplyLayoutDesignerSettingsCallback`. Custom * implementations should call this one in addition to any custom logic. * * @param args The arguments passed in from App Designer specifying the settings * and layout node to update. */ export declare function applyLayoutDesignerSettings(args: ApplyLayoutDesignerSettingsArgs): Promise; /** * Default implementation of `GetLayoutDesignerSettingsCallback`. Custom * implementations should call this one in addition to any custom logic. * * @param args The arguments passed in from App Designer specifying the layout * node. */ export declare function getLayoutDesignerSettings(args: GetLayoutDesignerSettingsArgs): Promise; /** * Returns a percentages array where each percentage is rounded to the nearest * whole number and the sum of all percentages is 100. * * @param percentages The percentages to update. */ export declare function prettyPercentages(percentages: number[]): number[]; /** * Returns the direction of the node's parent. All nodes inherently behave like * a stack (has a primary axis of up/down) except for a split. * * @param node The child node. */ export declare function getParentDirection(node: LayoutNode): "width" | "height"; /** * Returns whether the node is growing based on its configured layout * attributes. * * Possible cases: * * - Grow is > 0 (growing) * - Grow is undefined and width / height undefined (growing) * - Grow is undefined and width / height defined (fixed) * - Grow is 0 and width / height defined (fixed) * - Grow is 0 and width / height undefined (fixed). * * @param node The node to check. */ export declare function isComponentGrowing(node: LayoutNode): boolean;