import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSCoding } from "../Foundation/NSCoding.js";
import type { _NSIndexPath } from "../Foundation/NSIndexPath.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSSet } from "../Foundation/NSSet.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSCollectionView } from "./NSCollectionView.js";
import type { _NSCollectionViewLayoutAttributes } from "./NSCollectionViewLayoutAttributes.js";
import type { _NSCollectionViewLayoutInvalidationContext } from "./NSCollectionViewLayoutInvalidationContext.js";
import type { _NSNib } from "./NSNib.js";
import type { CGPoint } from "../structs/CGPoint.js";
import type { CGRect } from "../structs/CGRect.js";
import type { CGSize } from "../structs/CGSize.js";
export declare class _NSCollectionViewLayout extends _NSObject {
    static alloc(): _NSCollectionViewLayout;
    static new(): _NSCollectionViewLayout;
    init(): _NSCollectionViewLayout;
    /**
     * override this method to provide a custom class to be used when instantiating instances of NSCollectionViewLayoutAttributes
     */
    static layoutAttributesClass(): NobjcObject;
    /**
     * override this method to provide a custom class to be used for invalidation contexts
     */
    static invalidationContextClass(): NobjcObject;
    /**
     * Call -invalidateLayout to indicate that the collection view needs to requery the layout information. Subclasses must always call super if they override.
     */
    invalidateLayout(): void;
    invalidateLayoutWithContext$(context: _NSCollectionViewLayoutInvalidationContext): void;
    registerClass$forDecorationViewOfKind$(viewClass: NobjcObject | null, elementKind: _NSString): void;
    registerNib$forDecorationViewOfKind$(nib: _NSNib | null, elementKind: _NSString): void;
    /**
     * The collection view calls -prepareLayout once at its first layout as the first message to the layout instance. The collection view calls -prepareLayout again after layout is invalidated and before requerying the layout information. Subclasses should always call super if they override.
     */
    prepareLayout(): void;
    /** return an array layout attributes instances for all the views in the given rect */
    layoutAttributesForElementsInRect$(rect: CGRect): _NSArray;
    layoutAttributesForItemAtIndexPath$(indexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    layoutAttributesForSupplementaryViewOfKind$atIndexPath$(elementKind: _NSString, indexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    layoutAttributesForDecorationViewOfKind$atIndexPath$(elementKind: _NSString, indexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    /**
     * Returns an NSCollectionViewLayoutAttributes instance that identifies an appropriate proposed drop target from the given hover point. If the point is between items, the returned layout attributes may describe an inter-item gap, which is distinguished by having a representedElementCategory of NSCollectionElementCategoryInterItemGap, and a representedElementKind of NSCollectionElementKindInterItemGapIndicator. Its "frame" provides a bounding box for the gap, that will be used to position and size a drop target indicator, and its "indexPath" identifies the proposed "insert before" position. The frame might not contain the given point, if the insertion indicator should lie elsewhere. (For example, when a vertical Flow layout hit-tests a gap between rows, it may suggest an insertion gap to the left of the lower row's first item.) Subclasses should override this method to return appropriate results based on their knowledge of the particular layout. This method should return nil if no suitable drop target can be inferred from the given point.
     */
    layoutAttributesForDropTargetAtPoint$(pointInCollectionView: CGPoint): _NSCollectionViewLayoutAttributes | null;
    /**
     * Returns an NSCollectionViewLayoutAttributes instance that describes the inter-item gap preceding the given item indexPath. You may pass an indexPath whose "item" index equals the number of items in the section, to request a description of the gap after the last item. The result has a representedElementCategory of NSCollectionElementCategoryInterItemGap, and a representedElementKind of NSCollectionElementKindInterItemGapIndicator. Subclasses should override this method to return appropriate results based on their knowledge of the particular layout.
     */
    layoutAttributesForInterItemGapBeforeIndexPath$(indexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    /**
     * return YES to cause the collection view to requery the layout for geometry information
     */
    shouldInvalidateLayoutForBoundsChange$(newBounds: CGRect): boolean;
    invalidationContextForBoundsChange$(newBounds: CGRect): _NSCollectionViewLayoutInvalidationContext;
    shouldInvalidateLayoutForPreferredLayoutAttributes$withOriginalAttributes$(preferredAttributes: _NSCollectionViewLayoutAttributes, originalAttributes: _NSCollectionViewLayoutAttributes): boolean;
    invalidationContextForPreferredLayoutAttributes$withOriginalAttributes$(preferredAttributes: _NSCollectionViewLayoutAttributes, originalAttributes: _NSCollectionViewLayoutAttributes): _NSCollectionViewLayoutInvalidationContext;
    /**
     * return a point at which to rest after scrolling - for layouts that want snap-to-point scrolling behavior
     */
    targetContentOffsetForProposedContentOffset$withScrollingVelocity$(proposedContentOffset: CGPoint, velocity: CGPoint): CGPoint;
    /**
     * a layout can return the content offset to be applied during transition or update animations
     */
    targetContentOffsetForProposedContentOffset$(proposedContentOffset: CGPoint): CGPoint;
    /**
     * This method is called when there is an update with deletes/inserts to the collection view. It will be called prior to calling the initial/final layout attribute methods below to give the layout an opportunity to do batch computations for the insertion and deletion layout attributes. The updateItems parameter is an array of NSCollectionViewUpdateItem instances for each element that is moving to a new index path.
     */
    prepareForCollectionViewUpdates$(updateItems: _NSArray): void;
    /** called inside an animation block after the update */
    finalizeCollectionViewUpdates(): void;
    /**
     * NSCollectionView calls this when its bounds have changed inside an animation block before displaying items in its new bounds
     */
    prepareForAnimatedBoundsChange$(oldBounds: CGRect): void;
    /** also called inside the animation block */
    finalizeAnimatedBoundsChange(): void;
    /**
     * NSCollectionView calls this when prior the layout transition animation on the incoming and outgoing layout
     */
    prepareForTransitionToLayout$(newLayout: _NSCollectionViewLayout): void;
    prepareForTransitionFromLayout$(oldLayout: _NSCollectionViewLayout): void;
    /** called inside an animation block after the transition */
    finalizeLayoutTransition(): void;
    /**
     * This set of methods is called when the collection view undergoes an animated transition such as a batch update block or an animated bounds change. For each element on screen before the invalidation, finalLayoutAttributesForDisappearingXXX will be called and an animation setup from what is on screen to those final attributes. For each element on screen after the invalidation, initialLayoutAttributesForAppearingXXX will be called an an animation setup from those initial attributes to what ends up on screen.
     */
    initialLayoutAttributesForAppearingItemAtIndexPath$(itemIndexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    finalLayoutAttributesForDisappearingItemAtIndexPath$(itemIndexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    initialLayoutAttributesForAppearingSupplementaryElementOfKind$atIndexPath$(elementKind: _NSString, elementIndexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    finalLayoutAttributesForDisappearingSupplementaryElementOfKind$atIndexPath$(elementKind: _NSString, elementIndexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    initialLayoutAttributesForAppearingDecorationElementOfKind$atIndexPath$(elementKind: _NSString, decorationIndexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    finalLayoutAttributesForDisappearingDecorationElementOfKind$atIndexPath$(elementKind: _NSString, decorationIndexPath: _NSIndexPath): _NSCollectionViewLayoutAttributes | null;
    /**
     * These methods are called by collection view during an update block. Return an array of index paths to indicate views that the layout is deleting or inserting in response to the update.
     */
    indexPathsToDeleteForSupplementaryViewOfKind$(elementKind: _NSString): _NSSet;
    indexPathsToDeleteForDecorationViewOfKind$(elementKind: _NSString): _NSSet;
    indexPathsToInsertForSupplementaryViewOfKind$(elementKind: _NSString): _NSSet;
    indexPathsToInsertForDecorationViewOfKind$(elementKind: _NSString): _NSSet;
    /**
     * Methods in this class are meant to be overridden and will be called by its collection view to gather layout information. To get the truth on the current state of the collection view, call methods on NSCollectionView rather than these.
     */
    collectionView(): _NSCollectionView | null;
    /**
     * Subclasses must implement a collectionViewContentSize getter that returns the width and height of the collection view’s content. These values represent the width and height of all the content, not just the content that is currently visible. The collection view uses this information to configure its own content size to facilitate scrolling.
     */
    collectionViewContentSize(): CGSize;
}
export interface _NSCollectionViewLayout extends _NSCoding {
}
