import { AfterContentInit, OnDestroy } from '@angular/core';
import { NgForm } from '@angular/forms';
import { BottomDrawerRef, DynamicComponentDefinition, Widget } from '@c8y/ngx-components';
import { Subject } from 'rxjs';
import { ContextDashboardManagedObject, ContextWidgetConfig } from './context-dashboard.model';
import { ContextDashboardService } from './context-dashboard.service';
import { WidgetConfigService } from './widget-config.service';
import { WidgetConfigRootComponent } from './widget-config/widget-config-root.component';
import { WidgetService } from './widget.service';
import * as i0 from "@angular/core";
export declare class WidgetConfigComponent implements AfterContentInit, OnDestroy {
    private widgetService;
    private bottomDrawerRef;
    contextDashboardService: ContextDashboardService;
    widgetConfigService: WidgetConfigService;
    searchResult: DynamicComponentDefinition[];
    components: DynamicComponentDefinition[];
    selected: DynamicComponentDefinition;
    searchChange$: Subject<unknown>;
    searchTerm: string;
    context: any;
    componentLabel: string;
    mo: ContextDashboardManagedObject;
    styling: {
        headerClass: string;
        contentClass: string;
    };
    defaultStyling: {
        headerClass: string;
        contentClass: string;
    };
    current: any;
    widgetConfig: ContextWidgetConfig;
    isUpgrade: boolean;
    possibleStyling: {
        WIDGET_HEADER_CLASSES: [{
            readonly label: "Regular`style`";
            readonly class: "panel-title-regular";
            readonly description: "The widget has no border between header and content.";
        }, {
            readonly label: "Border`style`";
            readonly class: "panel-title-border";
            readonly description: "The widget has a small separation border between header and content.";
        }, {
            readonly label: "Overlay`style`";
            readonly class: "panel-title-overlay";
            readonly description: "The widget content overlays the header.";
        }, {
            readonly label: "Hidden`style`";
            readonly class: "panel-title-hidden";
            readonly description: "The widget header is not shown.";
        }];
        WIDGET_CONTENT_CLASSES: [{
            readonly label: "Branded`style`";
            readonly class: "panel-content-branded";
            readonly description: "The widget is styled with the main brand color.";
        }, {
            readonly label: "Match dashboard`style`";
            readonly class: "panel-content-light";
            readonly description: "The widget appearance matches the dashboard appearance.";
        }, {
            readonly label: "Light`style`";
            readonly class: "panel-content-white";
            readonly description: "The widget has light appearance, that is, dark text on light background.";
        }, {
            readonly label: "Dark`style`";
            readonly class: "panel-content-dark";
            readonly description: "The widget has dark appearance, that is, light text on dark background.";
        }, {
            readonly label: "Transparent`style`";
            readonly class: "panel-content-transparent";
            readonly description: "The widget has no background.";
        }];
    };
    configForm: NgForm;
    /**
     * Used as wrapper component to inject providers.
     */
    widgetConfigRoot: typeof WidgetConfigRootComponent;
    get isEdit(): boolean;
    get isDeviceTypeDashboard(): boolean;
    result: Promise<Widget>;
    private searchSub;
    private _save;
    private _cancel;
    constructor(widgetService: WidgetService, bottomDrawerRef: BottomDrawerRef<WidgetConfigComponent>, contextDashboardService: ContextDashboardService, widgetConfigService: WidgetConfigService);
    ngAfterContentInit(): Promise<void>;
    isSaveDisabled(): boolean;
    checkIfDeviceRequired(): boolean;
    save(): Promise<void>;
    select(cmp: any, mode?: 'select' | 'config'): void;
    search(): void;
    resetSearch(): void;
    backToWidgetSelection(): void;
    close(): Promise<void>;
    getStyle(isPreview?: boolean): {};
    ngOnDestroy(): void;
    private setStylings;
    private isDashboardDefaultStyle;
    private setDefaultStyle;
    private composeWidgetConfig;
    private applyTargetIfDeviceDashboard;
    static ɵfac: i0.ɵɵFactoryDeclaration<WidgetConfigComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<WidgetConfigComponent, "c8y-widget-config", never, {}, {}, never, never, false, never>;
}
//# sourceMappingURL=widget-config.component.d.ts.map