import type { BrandingService } from "../branding"; import type { LayoutNode } from "../layout"; import type { ButtonContainerPresentationSettings, ButtonStyle, Emphasis } from "../ui/Button/Button"; import type { SettingsSchema, LayoutDesignerSettings, GetLayoutDesignerSettingsCallback, ApplyLayoutDesignerSettingsCallback, GetLayoutDesignerSettingsSchemaCallback } from "."; /** * The type of the ButtonPresentationSchemaSettings. */ export type ButtonPresentationSchemaSettings = Omit & { buttonEmphasis?: Emphasis | "custom"; }; /** * Layout settings applicable to all buttons. */ export interface ButtonLayoutSettings extends LayoutDesignerSettings, ButtonPresentationSchemaSettings { } /** * XML attribute names for button presentation settings applied to components * that wrap buttons. */ export declare const componentAttributes: Record; /** * XML attribute names for button presentation settings applied to components * that _are_ buttons. */ export declare const buttonAttributes: Record; /** * Checks if any ancestor of the given node is a map extension. * * @param node The layout node to check. */ export declare function hasMapExtensionAncestor(node: LayoutNode): boolean; /** * Write the ButtonPresentationSettings to the supplied LayoutNode. * * @param settings Settings from LayoutDesignerSettings. * @param node The LayoutNode. * @param customDefaultStyle Provide a default button style that won't be * written out. */ export declare function applyButtonPresentationSettings(settings: ButtonContainerPresentationSettings, node: LayoutNode, customDefaultStyle?: ButtonStyle): void; /** * Gets the ButtonPresentationSchemaSettings from a given LayoutNode. "style" is * included here for compatibility with old layouts and mobile. * * @param node The LayoutNode. * @param customDefaultStyle Provide a default button style (the one that isn't * written to the layout). */ export declare function getButtonPresentationSettings(node: LayoutNode, customDefaultStyle?: ButtonStyle): ButtonPresentationSchemaSettings; /** * Get the settings schema for the selected button presentation settings. * * @param settings The ButtonPresentationSettings to get the schema for. * @param branding The BrandingService to use for default colors. */ export declare function getButtonPresentationSettingsSchema(settings: (keyof ButtonContainerPresentationSettings)[], branding?: BrandingService): SettingsSchema; export declare const getButtonLayoutSettingsSchemaCallback: (settings: (keyof ButtonContainerPresentationSettings)[]) => GetLayoutDesignerSettingsSchemaCallback; export declare const buttonLayoutSettingsCallback: GetLayoutDesignerSettingsCallback; export declare const applyButtonLayoutSettingsCallback: ApplyLayoutDesignerSettingsCallback;