import * as i0 from '@angular/core';
import { Type, ɵDirectiveDef as _DirectiveDef, OnDestroy } from '@angular/core';
import { Writable } from '@ngx-cocktail/common';
export { Features } from '@ngx-cocktail/common';
import * as rxjs from 'rxjs';
import { Observable } from 'rxjs';

declare function DestroyableFeature(): <T extends Type<unknown>>(directiveDef: Writable<_DirectiveDef<T>>) => void;

interface Destroyable extends Partial<OnDestroy> {
    readonly destroyed$: Observable<unknown>;
    ngOnDestroy?(): void;
}

declare const destroySubject: unique symbol;
declare abstract class Destroyed implements Destroyable {
    private readonly [destroySubject];
    readonly destroyed$: rxjs.Observable<unknown>;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<Destroyed, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<Destroyed, never, never, {}, {}, never, never, true, never>;
}

export { DestroyableFeature, Destroyed };
export type { Destroyable };
