import { Component, Input } from "@angular/core";
import { CommonModule } from "@angular/common";
import BuilderContext from "../../context/builder.context";
import ComponentsContext from "../../context/components.context";
import Block from "../block/block";
import BlocksWrapper from "./blocks-wrapper";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export default class Blocks {
    trackByBlock0(_, block) {
        return block.id;
    }
    constructor(builderContext, componentsContext) {
        this.builderContext = builderContext;
        this.componentsContext = componentsContext;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Blocks, deps: [{ token: BuilderContext }, { token: ComponentsContext }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: Blocks, isStandalone: true, selector: "blocks", inputs: { blocks: "blocks", parent: "parent", path: "path", styleProp: "styleProp", BlocksWrapperProps: "BlocksWrapperProps", context: "context", className: "className", linkComponent: "linkComponent", registeredComponents: "registeredComponents" }, ngImport: i0, template: `
    <blocks-wrapper
      [blocks]="blocks"
      [parent]="parent"
      [path]="path"
      [styleProp]="styleProp"
      [BlocksWrapperProps]="BlocksWrapperProps || context?.BlocksWrapperProps || builderContext?.BlocksWrapperProps"
      [classNameProp]="className"
      [BlocksWrapper]="context?.BlocksWrapper || builderContext?.BlocksWrapper"
    >
      <ng-content></ng-content>
      <ng-container *ngIf="blocks">
        <ng-container *ngFor="let block of blocks; trackBy: trackByBlock0">
          <block
            [block]="block"
            [linkComponent]="linkComponent"
            [context]="context || builderContext"
            [registeredComponents]="registeredComponents || componentsContext?.registeredComponents"
          ></block>
        </ng-container>
      </ng-container>
    </blocks-wrapper>
  `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BlocksWrapper, selector: "blocks-wrapper", inputs: ["blocks", "classNameProp", "path", "parent", "styleProp", "BlocksWrapperProps", "BlocksWrapper"] }, { kind: "component", type: Block, selector: "block", inputs: ["block", "context", "registeredComponents", "linkComponent"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Blocks, decorators: [{
            type: Component,
            args: [{ selector: "blocks", template: `
    <blocks-wrapper
      [blocks]="blocks"
      [parent]="parent"
      [path]="path"
      [styleProp]="styleProp"
      [BlocksWrapperProps]="BlocksWrapperProps || context?.BlocksWrapperProps || builderContext?.BlocksWrapperProps"
      [classNameProp]="className"
      [BlocksWrapper]="context?.BlocksWrapper || builderContext?.BlocksWrapper"
    >
      <ng-content></ng-content>
      <ng-container *ngIf="blocks">
        <ng-container *ngFor="let block of blocks; trackBy: trackByBlock0">
          <block
            [block]="block"
            [linkComponent]="linkComponent"
            [context]="context || builderContext"
            [registeredComponents]="registeredComponents || componentsContext?.registeredComponents"
          ></block>
        </ng-container>
      </ng-container>
    </blocks-wrapper>
  `, standalone: true, imports: [CommonModule, BlocksWrapper, Block], styles: [":host{display:contents}\n"] }]
        }], ctorParameters: function () { return [{ type: BuilderContext }, { type: ComponentsContext }]; }, propDecorators: { blocks: [{
                type: Input
            }], parent: [{
                type: Input
            }], path: [{
                type: Input
            }], styleProp: [{
                type: Input
            }], BlocksWrapperProps: [{
                type: Input
            }], context: [{
                type: Input
            }], className: [{
                type: Input
            }], linkComponent: [{
                type: Input
            }], registeredComponents: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 