import { __decorate } from "tslib";
import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
import { LayoutComponentBase, LayoutComponentRendererSADirective } from '@anglr/dynamic/layout';
import { LayoutEditorDesignerType, LayoutEditorMetadata } from '@anglr/dynamic/layout-editor';
import { RelationsChangeDetector, RelationsComponentManager, RelationsDebugger, RelationsManager, RelationsProcessor } from '@anglr/dynamic/relations';
import { HostDisplayBlockStyle } from '@anglr/common';
import { PlaceholderLayoutDesignerTypeLoader, PlaceholderLayoutMetadataLoader } from './placeholder.metadata';
import { PlaceholderHandler } from '../../services';
import { ContainerMetadataSAPipe } from './misc/pipes';
import * as i0 from "@angular/core";
/**
 * Component used for displaying placeholder
 */
let PlaceholderSAComponent = class PlaceholderSAComponent extends LayoutComponentBase {
    constructor() {
        super(...arguments);
        //######################### protected properties #########################
        /**
         * Handler used for working with placeholder
         */
        this.placeholderHandler = inject(PlaceholderHandler);
        //######################### public properties #########################
        /**
         * @inheritdoc
         */
        this.id = '';
    }
    //######################### public methods #########################
    /**
     * @inheritdoc
     */
    setId(id) {
        this.id = id;
    }
};
PlaceholderSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: PlaceholderSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
PlaceholderSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: PlaceholderSAComponent, isStandalone: true, selector: "placeholder", providers: [
        {
            provide: RelationsComponentManager,
            useFactory: () => inject(PlaceholderHandler).relationsComponentManager,
        },
        {
            provide: RelationsManager,
            useFactory: () => inject(PlaceholderHandler).relationsManager,
        },
        {
            provide: RelationsProcessor,
            useFactory: () => inject(PlaceholderHandler).relationsProcessor,
        },
        {
            provide: RelationsChangeDetector,
            useFactory: () => inject(PlaceholderHandler).relationsChangeDetector,
        },
        {
            provide: RelationsDebugger,
            useFactory: () => inject(PlaceholderHandler).relationsDebugger,
        },
        {
            provide: PlaceholderHandler,
            useFactory: () => {
                return new PlaceholderHandler(PlaceholderSAComponent);
            }
        },
    ], usesInheritance: true, ngImport: i0, template: "<ng-container>\n    <ng-container [layoutComponentRenderer]=\"id | containerMetadata\"></ng-container>\n</ng-container>", styles: [":host{display: block;}"], dependencies: [{ kind: "directive", type: LayoutComponentRendererSADirective, selector: "[layoutComponentRenderer]", inputs: ["layoutComponentRenderer", "layoutComponentRendererInjector", "layoutComponentRendererDisableTransformer"], outputs: ["layoutComponentRendererComponentChange", "componentElementChange"], exportAs: ["layoutComponentRenderer"] }, { kind: "pipe", type: ContainerMetadataSAPipe, name: "containerMetadata" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
PlaceholderSAComponent = __decorate([
    LayoutEditorDesignerType(PlaceholderLayoutDesignerTypeLoader),
    LayoutEditorMetadata(PlaceholderLayoutMetadataLoader)
], PlaceholderSAComponent);
export { PlaceholderSAComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: PlaceholderSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'placeholder', standalone: true, imports: [
                        LayoutComponentRendererSADirective,
                        ContainerMetadataSAPipe,
                    ], providers: [
                        {
                            provide: RelationsComponentManager,
                            useFactory: () => inject(PlaceholderHandler).relationsComponentManager,
                        },
                        {
                            provide: RelationsManager,
                            useFactory: () => inject(PlaceholderHandler).relationsManager,
                        },
                        {
                            provide: RelationsProcessor,
                            useFactory: () => inject(PlaceholderHandler).relationsProcessor,
                        },
                        {
                            provide: RelationsChangeDetector,
                            useFactory: () => inject(PlaceholderHandler).relationsChangeDetector,
                        },
                        {
                            provide: RelationsDebugger,
                            useFactory: () => inject(PlaceholderHandler).relationsDebugger,
                        },
                        {
                            provide: PlaceholderHandler,
                            useFactory: () => {
                                return new PlaceholderHandler(PlaceholderSAComponent);
                            }
                        },
                    ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n    <ng-container [layoutComponentRenderer]=\"id | containerMetadata\"></ng-container>\n</ng-container>", styles: [":host{display: block;}"] }]
        }] });
//# sourceMappingURL=placeholder.component.js.map