import { Directive, Input, InjectionToken } from '@angular/core';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
/**
 * Injection token that can be used to reference instances of `RDropListGroup`. It serves as
 * alternative token to the actual `RDropListGroup` class which could cause unnecessary
 * retention of the class and its directive metadata.
 */
export const R_DROP_LIST_GROUP = new InjectionToken('RDropListGroup');
/**
 * Declaratively connects sibling `rDropList` instances together. All of the `rDropList`
 * elements that are placed inside a `rDropListGroup` will be connected to each other
 * automatically. Can be used as an alternative to the `rDropListConnectedTo` input
 * from `rDropList`.
 */
export class RDropListGroup {
    constructor() {
        /** Drop lists registered inside the group. */
        this._items = new Set();
        this._disabled = false;
    }
    /** Whether starting a dragging sequence from inside this group is disabled. */
    get disabled() { return this._disabled; }
    set disabled(value) {
        this._disabled = coerceBooleanProperty(value);
    }
    ngOnDestroy() {
        this._items.clear();
    }
}
RDropListGroup.decorators = [
    { type: Directive, args: [{
                selector: '[rDropListGroup]',
                exportAs: 'rDropListGroup',
                providers: [{ provide: R_DROP_LIST_GROUP, useExisting: RDropListGroup }],
            },] }
];
RDropListGroup.propDecorators = {
    disabled: [{ type: Input, args: ['rDropListGroupDisabled',] }]
};
//# sourceMappingURL=drop-list-group.js.map