import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
import { LayoutComponentRendererSADirective } from '@anglr/dynamic/layout';
import { LayoutDesignerSAComponent } from '@anglr/dynamic/layout-editor';
import { HostDisplayBlockStyle } from '@anglr/common';
import { generateId } from '@jscrpt/common';
import { ListBlockSAComponent } from '../listBlock.component';
import * as i0 from "@angular/core";
/**
 * Component used for displaying list block designer
 */
export class ListBlockDesignerSAComponent extends ListBlockSAComponent {
    constructor() {
        super(...arguments);
        //######################### protected properties #########################
        /**
         * Instance of designer component
         */
        this.designer = inject(LayoutDesignerSAComponent);
    }
    //######################### protected methods - overrides #########################
    /**
     * @inheritdoc
     */
    onInit() {
        var _a;
        if (!this.designer.options) {
            return;
        }
        (_a = this.designer.options.typeMetadata).scope ?? (_a.scope = generateId(10));
    }
}
ListBlockDesignerSAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: ListBlockDesignerSAComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
ListBlockDesignerSAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.4", type: ListBlockDesignerSAComponent, isStandalone: true, selector: "list-block-designer", usesInheritance: true, ngImport: i0, template: "<ng-template [layoutComponentRenderer]=\"options?.template\"></ng-template>", styles: [":host{display: block;}"], dependencies: [{ 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: ListBlockDesignerSAComponent, decorators: [{
            type: Component,
            args: [{ selector: 'list-block-designer', standalone: true, imports: [
                        LayoutComponentRendererSADirective,
                    ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [layoutComponentRenderer]=\"options?.template\"></ng-template>", styles: [":host{display: block;}"] }]
        }] });
//# sourceMappingURL=listBlockDesigner.component.js.map