import * as i0 from '@angular/core';
import { OnInit, Type, ViewContainerRef, ChangeDetectorRef, OnChanges, AfterViewInit, SimpleChanges, OnDestroy, Injector, DestroyRef, EventEmitter } from '@angular/core';
import { NgDocPlaygroundConfig, NgDocPlaygroundProperties, NgDocPlaygroundOptions, NgDocPlaygroundProperty, NgDocPlaygroundContent } from '@ng-doc/core/interfaces';
import { Constructor } from '@ng-doc/core/types';
import { Observable } from 'rxjs';
import { FormGroup, FormControl } from '@angular/forms';
import { BreakpointObserver } from '@angular/cdk/layout';
import { NgDocProvidedTypeControl, NgDocTypeControlProviderOptions } from '@ng-doc/app/interfaces';

/**
 * Base class for playgrounds components.
 */
declare abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {
    private playgroundInstance?;
    static readonly selector: string;
    abstract readonly playground?: Type<any>;
    abstract readonly viewContainerRef?: ViewContainerRef;
    abstract readonly configData: Record<string, unknown>;
    properties: Record<string, any>;
    actionData: Record<string, unknown>;
    content: any;
    defaultValues: Record<string, unknown>;
    private reattached;
    private playgroundContainer;
    protected changeDetectorRef: ChangeDetectorRef;
    protected constructor(playgroundInstance?: Constructor<unknown> | undefined);
    get onReattached(): Observable<void>;
    ngOnInit(): void;
    get data(): any;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgDocBasePlayground, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocBasePlayground, never, never, { "properties": { "alias": "properties"; "required": false; }; "actionData": { "alias": "actionData"; "required": false; }; "content": { "alias": "content"; "required": false; }; }, {}, never, never, true, never>;
}

interface NgDocPlaygroundForm {
    properties: FormGroup<Record<string, FormControl<unknown>>>;
    content: FormGroup<Record<string, FormControl<boolean>>>;
}

declare class NgDocPlaygroundComponent<T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties> implements OnChanges, AfterViewInit {
    private readonly rootPage;
    private readonly formBuilder;
    id: string;
    pipeName: string;
    selectors: string[];
    properties?: T;
    options: NgDocPlaygroundOptions;
    recreateDemo: boolean;
    formGroup: FormGroup<NgDocPlaygroundForm>;
    defaultValues?: Record<string, unknown>;
    configuration: NgDocPlaygroundConfig;
    private defaultProperties;
    private defaultContent;
    constructor();
    ngOnChanges({ options }: SimpleChanges): void;
    ngAfterViewInit(): void;
    protected isDefaultState(): boolean;
    private getPropertiesFormValues;
    private getContentFormValues;
    resetForm(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundComponent<any>, "ng-doc-playground", never, { "id": { "alias": "id"; "required": true; }; "pipeName": { "alias": "pipeName"; "required": false; }; "selectors": { "alias": "selectors"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
}

declare class NgDocPlaygroundDemoComponent<T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties> implements OnChanges, OnDestroy {
    id: string;
    pipeName: string;
    selector: string;
    configuration?: NgDocPlaygroundConfig;
    properties?: T;
    recreateDemo: boolean;
    form: FormGroup<NgDocPlaygroundForm>;
    expanded: boolean;
    demoOutlet?: ViewContainerRef;
    playgroundDemo?: typeof NgDocBasePlayground;
    protected code: string;
    protected readonly injector: Injector;
    protected readonly changeDetectorRef: ChangeDetectorRef;
    protected readonly destroyRef: DestroyRef;
    private demoRef?;
    private readonly unsubscribe$;
    ngOnChanges({ form, id }: SimpleChanges): Promise<void>;
    private updateDemo;
    private createDemo;
    private updateCodeView;
    private getActiveContent;
    private getActiveInputs;
    private getPipeActiveInputs;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundDemoComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundDemoComponent<any>, "ng-doc-playground-demo", never, { "id": { "alias": "id"; "required": false; }; "pipeName": { "alias": "pipeName"; "required": false; }; "selector": { "alias": "selector"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "recreateDemo": { "alias": "recreateDemo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, {}, never, never, true, never>;
}

interface NgDocPlaygroundPropertyControl {
    propertyName: string;
    property: NgDocPlaygroundProperty;
    typeControl: NgDocProvidedTypeControl;
}

declare class NgDocPlaygroundPropertiesComponent<P extends NgDocPlaygroundProperties, C extends Record<string, NgDocPlaygroundContent>> implements OnChanges {
    protected readonly breakpointObserver: BreakpointObserver;
    private injector;
    form: FormGroup<NgDocPlaygroundForm>;
    properties?: P;
    ignoreInputs?: string[];
    dynamicContent?: C;
    defaultValues?: Record<string, unknown>;
    hideSidePanel: boolean;
    recreateDemo: boolean;
    showResetButton: boolean;
    recreateDemoChange: EventEmitter<boolean>;
    resetForm: EventEmitter<void>;
    readonly breakpoints: string[];
    readonly observer: Observable<boolean>;
    protected propertyControls: NgDocPlaygroundPropertyControl[];
    protected contentTypeControl?: NgDocProvidedTypeControl;
    constructor();
    ngOnChanges({ properties }: SimpleChanges): void;
    getFormControl(controlType: keyof NgDocPlaygroundForm, key: string): FormControl;
    private getTypeControl;
    private getControlForType;
    private getControlForTypeAlias;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundPropertiesComponent<any, any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundPropertiesComponent<any, any>, "ng-doc-playground-properties", never, { "form": { "alias": "form"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "ignoreInputs": { "alias": "ignoreInputs"; "required": false; }; "dynamicContent": { "alias": "dynamicContent"; "required": false; }; "defaultValues": { "alias": "defaultValues"; "required": false; }; "hideSidePanel": { "alias": "hideSidePanel"; "required": false; }; "recreateDemo": { "alias": "recreateDemo"; "required": false; }; "showResetButton": { "alias": "showResetButton"; "required": false; }; }, { "recreateDemoChange": "recreateDemoChange"; "resetForm": "resetForm"; }, never, ["*"], true, never>;
}

declare class NgDocPlaygroundPropertyComponent implements OnChanges {
    name: string;
    property?: NgDocPlaygroundProperty | NgDocPlaygroundContent;
    typeControl?: NgDocProvidedTypeControl;
    control?: FormControl;
    defaultValue?: unknown;
    propertyOutlet?: ViewContainerRef;
    protected option?: NgDocTypeControlProviderOptions;
    private propertyTypeControl?;
    ngOnChanges({ property, control, typeControl, defaultValue }: SimpleChanges): void;
    get hasPropertyControl(): boolean;
    get tooltipContent(): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundPropertyComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundPropertyComponent, "ng-doc-playground-property", never, { "name": { "alias": "name"; "required": false; }; "property": { "alias": "property"; "required": false; }; "typeControl": { "alias": "typeControl"; "required": false; }; "control": { "alias": "control"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; }, {}, never, never, true, never>;
}

export { NgDocBasePlayground, NgDocPlaygroundComponent, NgDocPlaygroundDemoComponent, NgDocPlaygroundPropertiesComponent, NgDocPlaygroundPropertyComponent };
export type { NgDocPlaygroundForm, NgDocPlaygroundPropertyControl };
