import '../../../../assert/js/assert.js';
import '../../../../globals.js';
/**
 * A group of alignment boxes that follow the constraints:
 * 1. Every box will have the same bounds, with an upper-left of (0,0)
 * 2. The box sizes will be the smallest possible to fit every box's content (with respective padding).
 * 3. Each box is responsible for positioning its content in its bounds (with customizable alignment and padding).
 *
 * Align boxes can be dynamically created and disposed, and only active boxes will be considered for the bounds.
 *
 * Since many sun components do not support resizing their contents dynamically, you may need to populate the AlignGroup
 * in the order of largest to smallest so that a fixed size container is large enough to contain the largest item.
 *
 * NOTE: Align box resizes may not happen immediately, and may be delayed until bounds of a align box's child occurs.
 *       layout updates can be forced with group.updateLayout(). If the align box's content that changed is connected
 *       to a Scenery display, its bounds will update when Display.updateDisplay() will called, so this will guarantee
 *       that the layout will be applied before it is displayed.
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import TProperty from '../../../../axon/js/TProperty.js';
import { AlignBox, Node } from '../../imports.js';
import { AlignBoxOptions } from '../nodes/AlignBox.js';
import Disposable, { DisposableOptions } from '../../../../axon/js/Disposable.js';
import Orientation from '../../../../phet-core/js/Orientation.js';
import StrictOmit from '../../../../phet-core/js/types/StrictOmit.js';
type SelfOptions = {
    matchHorizontal?: boolean;
    matchVertical?: boolean;
};
export type AlignGroupOptions = SelfOptions & DisposableOptions;
export default class AlignGroup extends Disposable {
    private readonly _alignBoxes;
    private _matchHorizontal;
    private _matchVertical;
    private _resizeLock;
    private readonly _maxWidthProperty;
    private readonly _maxHeightProperty;
    private readonly id;
    /**
     * Creates an alignment group that can be composed of multiple boxes.
     *
     * Use createBox() to create alignment boxes. You can dispose() individual boxes, or call dispose() on this
     * group to dispose all of them.
     *
     * It is also possible to create AlignBox instances independently and assign their 'group' to this AlignGroup.
     */
    constructor(providedOptions?: AlignGroupOptions);
    /**
     * Returns the current maximum width of the grouped content.
     */
    getMaxWidth(): number;
    get maxWidth(): number;
    /**
     * Returns the Property holding the current maximum width of the grouped content.
     */
    getMaxWidthProperty(): TProperty<number>;
    get maxWidthProperty(): TProperty<number>;
    /**
     * Returns the current maximum height of the grouped content.
     */
    getMaxHeight(): number;
    get maxHeight(): number;
    /**
     * Returns the Property holding the current maximum height of the grouped content.
     */
    getMaxHeightProperty(): TProperty<number>;
    get maxHeightProperty(): TProperty<number>;
    getMaxSizeProperty(orientation: Orientation): TProperty<number>;
    /**
     * Creates an alignment box with the given content and options.
     */
    createBox(content: Node, options?: StrictOmit<AlignBoxOptions, 'group'>): AlignBox;
    /**
     * Sets whether the widths of the align boxes should all match. If false, each box will use its preferred width
     * (usually equal to the content width + horizontal margins).
     */
    setMatchHorizontal(matchHorizontal: boolean): this;
    set matchHorizontal(value: boolean);
    get matchHorizontal(): boolean;
    /**
     * Returns whether boxes currently are horizontally matched. See setMatchHorizontal() for details.
     */
    getMatchHorizontal(): boolean;
    /**
     * Sets whether the heights of the align boxes should all match. If false, each box will use its preferred height
     * (usually equal to the content height + vertical margins).
     */
    setMatchVertical(matchVertical: boolean): this;
    set matchVertical(value: boolean);
    get matchVertical(): boolean;
    /**
     * Returns whether boxes currently are vertically matched. See setMatchVertical() for details.
     */
    getMatchVertical(): boolean;
    /**
     * Updates the localBounds and alignment for each alignBox.
     *
     * NOTE: Calling this will usually not be necessary outside of Scenery, but this WILL trigger bounds revalidation
     *       for every alignBox, which can force the layout code to run.
     */
    updateLayout(): void;
    /**
     * Sets a box's bounds based on our maximum dimensions.
     */
    private setBoxBounds;
    /**
     * Lets the group know that the alignBox has had its content resized. Called by the AlignBox
     * (scenery-internal)
     */
    onAlignBoxResized(alignBox: AlignBox): void;
    /**
     * Adds the AlignBox to the group -- Used in AlignBox --- do NOT use in public code
     * (scenery-internal)
     */
    addAlignBox(alignBox: AlignBox): void;
    /**
     * Removes the AlignBox from the group
     * (scenery-internal)
     */
    removeAlignBox(alignBox: AlignBox): void;
    /**
     * Dispose all the boxes.
     */
    dispose(): void;
}
export {};
//# sourceMappingURL=AlignGroup.d.ts.map