System.register(["@angular/core", "@angular/platform-browser", "@stratusjs/runtime/stratus", "lodash", "@stratusjs/core/environment", "../core/root.component"], function (exports_1, context_1) {
    "use strict";
    var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __metadata = (this && this.__metadata) || function (k, v) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };
    var core_1, platform_browser_1, stratus_1, lodash_1, environment_1, root_component_1, systemDir, moduleName, min, localDir, BaseComponent;
    var __moduleName = context_1 && context_1.id;
    return {
        setters: [
            function (core_1_1) {
                core_1 = core_1_1;
            },
            function (platform_browser_1_1) {
                platform_browser_1 = platform_browser_1_1;
            },
            function (stratus_1_1) {
                stratus_1 = stratus_1_1;
            },
            function (lodash_1_1) {
                lodash_1 = lodash_1_1;
            },
            function (environment_1_1) {
                environment_1 = environment_1_1;
            },
            function (root_component_1_1) {
                root_component_1 = root_component_1_1;
            }
        ],
        execute: function () {
            systemDir = '@stratusjs/angular';
            moduleName = 'base';
            min = !environment_1.cookie('env') ? '.min' : '';
            localDir = `${stratus_1.Stratus.BaseUrl}${boot.configuration.paths[`${systemDir}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
            BaseComponent = class BaseComponent extends root_component_1.RootComponent {
                constructor(sanitizer, ref, elementRef) {
                    super();
                    this.sanitizer = sanitizer;
                    this.ref = ref;
                    this.elementRef = elementRef;
                    this.title = moduleName + '_component';
                    stratus_1.Stratus.Instances[lodash_1.default.uniqueId('sa_base_component_')] = this;
                    this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "sanitizer", "ref", "elementRef", "ngOnInit", "ngOnChanges", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
                }
                ngOnInit() {
                    console.info('selector.ngOnInit');
                }
                ngOnChanges() {
                    if (!environment_1.cookie('env')) {
                        return;
                    }
                    console.log('inputs:', {
                        target: this.target,
                        targetSuffix: this.targetSuffix,
                        id: this.id,
                        manifest: this.manifest,
                        decouple: this.decouple,
                        direct: this.direct,
                        api: this.api,
                        urlRoot: this.urlRoot,
                    });
                }
            };
            __decorate([
                core_1.Input(),
                __metadata("design:type", String)
            ], BaseComponent.prototype, "target", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", String)
            ], BaseComponent.prototype, "targetSuffix", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", Number)
            ], BaseComponent.prototype, "id", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", Boolean)
            ], BaseComponent.prototype, "manifest", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", Boolean)
            ], BaseComponent.prototype, "decouple", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", Boolean)
            ], BaseComponent.prototype, "direct", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", Object)
            ], BaseComponent.prototype, "api", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", String)
            ], BaseComponent.prototype, "urlRoot", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", String)
            ], BaseComponent.prototype, "type", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", String)
            ], BaseComponent.prototype, "property", void 0);
            __decorate([
                core_1.Input(),
                __metadata("design:type", String)
            ], BaseComponent.prototype, "endpoint", void 0);
            BaseComponent = __decorate([
                core_1.Component({
                    selector: 'sa-base',
                    templateUrl: `${localDir}/${moduleName}/${moduleName}.component${min}.html`,
                }),
                __metadata("design:paramtypes", [platform_browser_1.DomSanitizer,
                    core_1.ChangeDetectorRef,
                    core_1.ElementRef])
            ], BaseComponent);
            exports_1("BaseComponent", BaseComponent);
        }
    };
});

//# sourceMappingURL=base.component.js.map
