import { Inject, Injectable, Optional } from '@angular/core';
import { DynamicItemLoader } from '@anglr/dynamic';
import { LAYOUT_COMPONENTS_LOADER } from '@anglr/dynamic/layout';
import { LOGGER } from '@anglr/common';
import { LayoutComponentsIterator } from './layoutComponents.iterator';
import { LayoutComponentsChildrenIterator } from './layoutComponentsChildren.iterator';
import * as i0 from "@angular/core";
import * as i1 from "@anglr/dynamic";
/**
 * Service used for creating LayoutComponentsIterator
 */
export class LayoutComponentsIteratorService {
    //######################### constructor #########################
    constructor(loader, logger) {
        this.loader = loader;
        this.logger = logger;
    }
    //######################### public methods #########################
    /**
     * Gets iterator for specified layout metadata
     * @param layoutMetadata - Metadata for which will be iterator created
     */
    getIteratorFor(layoutMetadata) {
        return new LayoutComponentsIterator(layoutMetadata, this.loader, this.logger);
    }
    /**
     * Gets children iterator for specified layout metadata
     * @param layoutMetadata - Metadata for which will be children iterator created
     */
    getChildrenIteratorFor(layoutMetadata) {
        return new LayoutComponentsChildrenIterator(layoutMetadata, this.loader, this.logger);
    }
}
LayoutComponentsIteratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LayoutComponentsIteratorService, deps: [{ token: LAYOUT_COMPONENTS_LOADER }, { token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
LayoutComponentsIteratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LayoutComponentsIteratorService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LayoutComponentsIteratorService, decorators: [{
            type: Injectable
        }], ctorParameters: () => [{ type: i1.DynamicItemLoader, decorators: [{
                    type: Inject,
                    args: [LAYOUT_COMPONENTS_LOADER]
                }] }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [LOGGER]
                }, {
                    type: Optional
                }] }] });
//# sourceMappingURL=layoutComponentsIterator.service.js.map