import { __awaiter } from "tslib";
import { Inject, Injectable, Optional } from '@angular/core';
import { LOGGER } from '@anglr/common';
import * as i0 from "@angular/core";
/**
 * Dynamic module relations types provider, for custom components types
 */
export class CustomComponentsDynamicModuleRelationsProvider {
    //######################### constructor #########################
    constructor(_logger) {
        this._logger = _logger;
    }
    //######################### public methods - implementation of DynamicItemLoaderProvider #########################
    /**
     * @inheritdoc
     */
    tryToGet(source) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            //only works with custom components
            if (source.package != 'custom-components') {
                return null;
            }
            (_a = this._logger) === null || _a === void 0 ? void 0 : _a.debug('CustomComponentsDynamicModuleRelationsProvider: trying to get relations types {{@item}}', { item: { name: source.name, package: source.package } });
            return {
                default: [
                    'componentInputs',
                    'componentOutputs',
                ]
            };
        });
    }
}
CustomComponentsDynamicModuleRelationsProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CustomComponentsDynamicModuleRelationsProvider, deps: [{ token: LOGGER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
CustomComponentsDynamicModuleRelationsProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CustomComponentsDynamicModuleRelationsProvider });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: CustomComponentsDynamicModuleRelationsProvider, decorators: [{
            type: Injectable
        }], ctorParameters: () => [{ type: undefined, decorators: [{
                    type: Inject,
                    args: [LOGGER]
                }, {
                    type: Optional
                }] }] });
//# sourceMappingURL=customComponentsDynamicModuleRelationsProvider.service.js.map