/**
 * Sketch utilities for the experience builder application.
 *
 * @internal
 */
import type Sketch from "../../widgets/Sketch.js";
import type { CustomActionProps, CustomToolOptions } from "../../widgets/Sketch/types.js";

/**
 * Configures a Sketch widget to display custom tools.
 *
 * @param sketch - Reference to the sketch widget to configure.
 * @param createToolOptions - Options for the custom tools.
 * @param customActionOptions - Options for the custom tools.
 * @returns The passed in sketch widget.
 * @internal
 */
export function setCustomTools(sketch: Sketch, createToolOptions?: CustomToolOptions[] | null, customActionOptions?: CustomActionProps[] | null): Sketch;

/**
 * Closes the settings popover, if it is open.
 *
 * @param sketch - Reference to the sketch widget to configure.
 * @since 4.32
 * @internal
 */
export function dismissFloatingElements(sketch: Sketch): void;

/**
 * Configures the sketch widget's selection appearance. Set to "inline" in situations where a separate floating element is unacceptable.
 *
 * @param sketch - Reference to the sketch widget to configure.
 * @param location - Selection tool location.
 * @returns The passed in sketch widget.
 * @since 4.32
 * @internal
 */
export function setContextualToolLocation(sketch: Sketch, location: "inline" | "inline-end" | "separate"): Sketch;

/** @internal */
export type SketchGroupName = "selectionTools" | "selectionSet" | "createTools" | "undoRedo" | "settings";

/**
 * Configures the sketch widget's item grouping behavior.
 * Set a group to -1 to cause it to collapse automatically regardless of available space.
 * Remaining space is allocated to groups according to their priority, highest priority getting
 * space first.
 *
 * @param sketch - Reference to the sketch widget to configure.
 * @param priorities - Group priorities.
 * @returns The passed in sketch widget.
 * @since 4.32
 * @internal
 */
export function setGroupCollapsePriorities(sketch: Sketch, priorities: Map<SketchGroupName, number> | null | undefined): Sketch;

/**
 * Configures the sketch widget's group collapse behavior.
 * Set a group to `true` to allow it to collapse (regardless of default behavior), or
 * `false` to prevent it from collapsing.
 *
 * @param sketch - Reference to the sketch widget to configure.
 * @param options - Group collapse options.
 * @returns The passed in sketch widget.
 * @since 4.33
 * @internal
 */
export function setGroupAllowCollapse(sketch: Sketch, options: Map<SketchGroupName, boolean> | null | undefined): Sketch;