import type { ICollectionReorder, INotifyCollectionReordered } from '../../collections'; import { ValidationTrigger } from './ValidationTrigger'; /** * Represents the collection reordered validation trigger configuration. * @template TItem The type of item the collection contains. * @template TCollection The collection type that may trigger validations. */ export interface ICollectionReorderedValidationTriggerConfig = INotifyCollectionReordered> { /** * Gets the collection that may trigger a validation. */ readonly collection: TCollection; /** * Optional, a guard method which controls when a validation should be triggered. * @param collection The collection that changed. * @param collectionReorder The collection reorder information. */ shouldTriggerValidation?(collection: TCollection, collectionReorder: ICollectionReorder): boolean; } /** * Represents a collection reordered validation trigger. Whenever the collection reorders a validation may be triggered. * @template TItem The type of item the collection contains. * @template TCollection The collection type that may trigger validations. */ export declare class CollectionReorderedValidationTrigger = INotifyCollectionReordered> extends ValidationTrigger { private readonly _collectionReorderedEventHandler; /** * Initializes a new instance of the {@linkcode CollectionReorderedValidationTrigger} class. * @param config The validation trigger config. */ constructor(config: ICollectionReorderedValidationTriggerConfig); /** * Subscribes to collection reordering. */ protected subscribeToTarget(): void; /** * Unsubscribes from collection reordering. */ protected unsubscribeFromTarget(): void; }