import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LayoutComponentRendererSADirective, LAYOUT_COMPONENT_TRANSFORM } from '@anglr/dynamic/layout';
import { HostDisplayBlockStyle } from '@anglr/common';
import { PlaceholderSAComponent } from '../placeholder.component';
import { PlaceholderHandler } from '../../../services';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
/**
 * Component used for displaying placeholder designer
 */
export class PlaceholderDesignerSAComponent extends PlaceholderSAComponent {
    //######################### protected methods - overrides #########################
    /**
     * @inheritdoc
     */
    afterInit() {
        //only when displaying container
        if (this.placeholderHandler.placeholderContainer && this.placeholderHandler.designMode) {
            this.placeholderHandler.initOptions();
        }
    }
}
PlaceholderDesignerSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: PlaceholderDesignerSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
PlaceholderDesignerSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: PlaceholderDesignerSAComponent, isStandalone: true, selector: "placeholder-designer", providers: [
        {
            provide: LAYOUT_COMPONENT_TRANSFORM,
            useFactory: () => inject(PlaceholderHandler).layoutDesignerComponentTransform,
        },
        {
            provide: PlaceholderHandler,
            useFactory: () => {
                return new PlaceholderHandler(PlaceholderDesignerSAComponent);
            }
        },
    ], usesInheritance: true, ngImport: i0, template: "<div class=\"placeholder\" *ngIf=\"!placeholderHandler.placeholderContainer; else container\"></div>\n\n<ng-template #container>\n    <ng-container [layoutComponentRenderer]=\"placeholderHandler.getOptions(id)\"></ng-container>\n</ng-template>", styles: [":host{display: block;}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LayoutComponentRendererSADirective, selector: "[layoutComponentRenderer]", inputs: ["layoutComponentRenderer", "layoutComponentRendererInjector", "layoutComponentRendererDisableTransformer"], outputs: ["layoutComponentRendererComponentChange", "componentElementChange"], exportAs: ["layoutComponentRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: PlaceholderDesignerSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'placeholder-designer', standalone: true, imports: [
                        CommonModule,
                        LayoutComponentRendererSADirective,
                    ], providers: [
                        {
                            provide: LAYOUT_COMPONENT_TRANSFORM,
                            useFactory: () => inject(PlaceholderHandler).layoutDesignerComponentTransform,
                        },
                        {
                            provide: PlaceholderHandler,
                            useFactory: () => {
                                return new PlaceholderHandler(PlaceholderDesignerSAComponent);
                            }
                        },
                    ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"placeholder\" *ngIf=\"!placeholderHandler.placeholderContainer; else container\"></div>\n\n<ng-template #container>\n    <ng-container [layoutComponentRenderer]=\"placeholderHandler.getOptions(id)\"></ng-container>\n</ng-template>", styles: [":host{display: block;}"] }]
        }] });
//# sourceMappingURL=placeholderDesigner.component.js.map