import '../../../../assert/js/assert.js';
import '../../../../globals.js';
/**
 * A LayoutCell that has margins, and can be positioned and sized relative to those. Used for Flow/Grid layouts
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Bounds2 from '../../../../dot/js/Bounds2.js';
import Orientation from '../../../../phet-core/js/Orientation.js';
import { LayoutAlign, LayoutCell, LayoutProxy, Node, NodeLayoutConstraint } from '../../imports.js';
export type MarginLayout = {
    _leftMargin: number | null;
    _rightMargin: number | null;
    _topMargin: number | null;
    _bottomMargin: number | null;
    _minContentWidth: number | null;
    _minContentHeight: number | null;
    _maxContentWidth: number | null;
    _maxContentHeight: number | null;
};
export type MarginLayoutConstraint = NodeLayoutConstraint & MarginLayout;
export default class MarginLayoutCell extends LayoutCell {
    private readonly _marginConstraint;
    private readonly preferredSizeSet;
    _leftMargin: number | null;
    _rightMargin: number | null;
    _topMargin: number | null;
    _bottomMargin: number | null;
    _minContentWidth: number | null;
    _minContentHeight: number | null;
    _maxContentWidth: number | null;
    _maxContentHeight: number | null;
    lastAvailableBounds: Bounds2;
    lastUsedBounds: Bounds2;
    /**
     * NOTE: Consider this scenery-internal AND protected. It's effectively a protected constructor for an abstract type,
     * but cannot be due to how mixins constrain things (TypeScript doesn't work with private/protected things like this)
     *
     * (scenery-internal)
     */
    constructor(constraint: MarginLayoutConstraint, node: Node, proxy: LayoutProxy | null);
    /**
     * Positions and sizes the cell (used for grid and flow layouts)
     * (scenery-internal)
     *
     * Returns the cell's bounds
     */
    reposition(orientation: Orientation, lineSize: number, linePosition: number, stretch: boolean, originOffset: number, align: LayoutAlign): Bounds2;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveLeftMargin(): number;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveRightMargin(): number;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveTopMargin(): number;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveBottomMargin(): number;
    /**
     * (scenery-internal)
     */
    getEffectiveMinMargin(orientation: Orientation): number;
    /**
     * (scenery-internal)
     */
    getEffectiveMaxMargin(orientation: Orientation): number;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveMinContentWidth(): number | null;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveMinContentHeight(): number | null;
    /**
     * (scenery-internal)
     */
    getEffectiveMinContent(orientation: Orientation): number | null;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveMaxContentWidth(): number | null;
    /**
     * Returns the used value, with this cell's value taking precedence over the constraint's default
     * (scenery-internal)
     */
    get effectiveMaxContentHeight(): number | null;
    /**
     * (scenery-internal)
     */
    getEffectiveMaxContent(orientation: Orientation): number | null;
    /**
     * Returns the effective minimum size this cell can take (including the margins)
     * (scenery-internal)
     */
    getMinimumSize(orientation: Orientation): number;
    /**
     * Returns the effective maximum size this cell can take (including the margins)
     * (scenery-internal)
     */
    getMaximumSize(orientation: Orientation): number;
    /**
     * Sets a preferred size on the content, obeying many constraints.
     * (scenery-internal)
     */
    attemptPreferredSize(orientation: Orientation, value: number): void;
    /**
     * Unsets the preferred size (if WE set it)
     * (scenery-internal)
     */
    unsetPreferredSize(orientation: Orientation): void;
    /**
     * Sets the left/top position of the (content+margin) for the cell in the constraint's ancestor coordinate frame.
     * (scenery-internal)
     */
    positionStart(orientation: Orientation, value: number): void;
    /**
     * Sets the x/y value of the content for the cell in the constraint's ancestor coordinate frame.
     * (scenery-internal)
     */
    positionOrigin(orientation: Orientation, value: number): void;
    /**
     * Returns the bounding box of the cell if it was repositioned to have its origin shifted to the origin of the
     * ancestor node's local coordinate frame.
     * (scenery-internal)
     */
    getOriginBounds(): Bounds2;
    /**
     * The current bounds of the cell (with margins included)
     * (scenery-internal)
     */
    getCellBounds(): Bounds2;
    dispose(): void;
    static createHelperNode<Cell extends MarginLayoutCell>(cells: Cell[], layoutBounds: Bounds2, cellToText: (cell: Cell) => string): Node;
}
//# sourceMappingURL=MarginLayoutCell.d.ts.map