import * as i0 from '@angular/core'; import { OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChange, ModuleWithProviders } from '@angular/core'; import { Observable } from 'rxjs'; import { DragulaOptions as DragulaOptions$1, Drake } from 'dragula'; interface DragulaOptions extends DragulaOptions$1 { copySortSource?: boolean | ((el: Element, source: Element) => boolean); /** You must provide this if you are using `copy` with `[dragulaModel]`. It * is responsible for cloning a model item. Your implementation should * ensure `x !== copyItem(x)` -- so you must create a *new* object. **/ copyItem?: (item: T) => T; } interface DrakeWithModels extends Drake { models?: any[][]; } type DrakeBuilder = (containers: any[], options: DragulaOptions) => DrakeWithModels; declare class DrakeFactory { build: DrakeBuilder; constructor(build?: DrakeBuilder); } declare class Group { name: string; drake: DrakeWithModels; options: DragulaOptions; initEvents: boolean; constructor(name: string, drake: DrakeWithModels, options: DragulaOptions); } interface DropEvent { name: string; el: Element; target: Element; source: Element; sibling: Element; } declare class DragulaService { private drakeFactory; private dispatch$; drag: (groupName?: string) => Observable<{ name: string; el: Element; source: Element; }>; dragend: (groupName?: string) => Observable<{ name: string; el: Element; }>; drop: (groupName?: string) => Observable; private elContainerSource; cancel: (groupName?: string) => Observable<{ name: string; el: Element; container: Element; source: Element; }>; remove: (groupName?: string) => Observable<{ name: string; el: Element; container: Element; source: Element; }>; shadow: (groupName?: string) => Observable<{ name: string; el: Element; container: Element; source: Element; }>; over: (groupName?: string) => Observable<{ name: string; el: Element; container: Element; source: Element; }>; out: (groupName?: string) => Observable<{ name: string; el: Element; container: Element; source: Element; }>; cloned: (groupName?: string) => Observable<{ name: string; clone: Element; original: Element; cloneType: "mirror" | "copy"; }>; dropModel: (groupName?: string) => Observable<{ name: string; el: Element; target: Element; source: Element; sibling: Element; item: T; sourceModel: T[]; targetModel: T[]; sourceIndex: number; targetIndex: number; }>; removeModel: (groupName?: string) => Observable<{ name: string; el: Element; container: Element; source: Element; item: T; sourceModel: T[]; sourceIndex: number; }>; private groups; constructor(drakeFactory?: DrakeFactory); /** Public mainly for testing purposes. Prefer `createGroup()`. */ add(group: Group): Group; find(name: string): Group; destroy(name: string): void; /** * Creates a group with the specified name and options. * * Note: formerly known as `setOptions` */ createGroup(name: string, options: DragulaOptions): Group; private handleModels; private setupEvents; private domIndexOf; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class DragulaDirective implements OnChanges, OnDestroy { private el; private dragulaService; dragula: string; dragulaModel: any[]; dragulaModelChange: EventEmitter; private subs; private get container(); private group; constructor(el: ElementRef, dragulaService: DragulaService); ngOnChanges(changes: { dragula?: SimpleChange; dragulaModel?: SimpleChange; }): void; setup(): void; subscribe(name: string): void; teardown(groupName: string): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class DragulaModule { static forRoot(): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { DragulaDirective, DragulaModule, DragulaService }; export type { DragulaOptions, DropEvent };