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";
export default class Blocks {
    trackByBlock0(_, block) {
        return block.id;
    }
    constructor(builderContext, componentsContext) {
        this.builderContext = builderContext;
        this.componentsContext = componentsContext;
        this.BlocksWrapper = BlocksWrapper;
        this.blocks = input();
        this.parent = input();
        this.path = input();
        this.styleProp = input();
        this.BlocksWrapperProps = input();
        this.context = input();
        this.className = input();
        this.linkComponent = input();
        this.registeredComponents = input();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Blocks, deps: [{ token: BuilderContext }, { token: ComponentsContext }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: Blocks, isStandalone: true, selector: "blocks", inputs: { blocks: { classPropertyName: "blocks", publicName: "blocks", isSignal: true, isRequired: false, transformFunction: null }, parent: { classPropertyName: "parent", publicName: "parent", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, styleProp: { classPropertyName: "styleProp", publicName: "styleProp", isSignal: true, isRequired: false, transformFunction: null }, BlocksWrapperProps: { classPropertyName: "BlocksWrapperProps", publicName: "BlocksWrapperProps", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, linkComponent: { classPropertyName: "linkComponent", publicName: "linkComponent", isSignal: true, isRequired: false, transformFunction: null }, registeredComponents: { classPropertyName: "registeredComponents", publicName: "registeredComponents", isSignal: true, isRequired: false, transformFunction: null } }, 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>
      @if(blocks()){ @for (block of blocks();track trackByBlock0(i, block);let i
      = $index) {
      <block
        [block]="block"
        [linkComponent]="linkComponent()"
        [context]="context() || builderContext"
        [registeredComponents]="registeredComponents() || componentsContext?.registeredComponents"
      ></block>
      } }
    </blocks-wrapper>
  `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "17.3.12", ngImport: i0, type: Blocks, decorators: [{
            type: Component,
            args: [{ selector: "blocks", standalone: true, imports: [CommonModule, BlocksWrapper, Block], 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>
      @if(blocks()){ @for (block of blocks();track trackByBlock0(i, block);let i
      = $index) {
      <block
        [block]="block"
        [linkComponent]="linkComponent()"
        [context]="context() || builderContext"
        [registeredComponents]="registeredComponents() || componentsContext?.registeredComponents"
      ></block>
      } }
    </blocks-wrapper>
  `, styles: [":host{display:contents}\n"] }]
        }], ctorParameters: () => [{ type: BuilderContext }, { type: ComponentsContext }] });
//# sourceMappingURL=data:application/json;base64, 