import { Component, effect } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "mobicloud-core";
import * as i2 from "@angular/common";
import * as i3 from "../profile-page-system-user/profile-page-system-user.component";
import * as i4 from "../profile-page-employee/profile-page-employee.component";
import * as i5 from "../profile-page-customer-user/profile-page-customer-user.component";
import * as i6 from "../profile-page-vendor-user/profile-page-vendor-user.component";
export class ProfilePageComponent {
    constructor(coreService) {
        this.coreService = coreService;
        this.isSystemUser = false;
        this.isEmployee = false;
        this.isCustomerUser = false;
        this.isVendorUser = false;
        effect(() => {
            const p = this.coreService.mobiUserProfile();
            this.isSystemUser = p?.isOrganizationUser;
            this.isEmployee = p?.isEmployeeUser;
            this.isCustomerUser = p?.isCustomerUser;
            this.isVendorUser = p?.isVendorUser;
        });
    }
    ngOnInit() {
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProfilePageComponent, deps: [{ token: i1.MobicloudCoreService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ProfilePageComponent, selector: "mobicloud-profile-page", ngImport: i0, template: "<div class=\"profile-container\">    \n\n    <mobicloud-profile-page-system-user *ngIf=\"isSystemUser\"></mobicloud-profile-page-system-user>\n    <mobicloud-profile-page-employee *ngIf=\"isEmployee\"></mobicloud-profile-page-employee>\n    <mobicloud-profile-page-customer-user *ngIf=\"isCustomerUser\"></mobicloud-profile-page-customer-user>\n    <mobicloud-profile-page-vendor-user *ngIf=\"isVendorUser\"></mobicloud-profile-page-vendor-user>\n\n</div>\n", styles: [".profile-container{margin:20px 20px 10px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ProfilePageSystemUserComponent, selector: "mobicloud-profile-page-system-user", inputs: ["isLoadingData", "loadingText", "hasErrors", "errorCaption", "errorText", "enableRetryOnError"], outputs: ["systemUser"] }, { kind: "component", type: i4.ProfilePageEmployeeComponent, selector: "mobicloud-profile-page-employee", inputs: ["isLoadingData", "loadingText", "hasErrors", "errorCaption", "errorText", "enableRetryOnError"], outputs: ["employee"] }, { kind: "component", type: i5.ProfilePageCustomerUserComponent, selector: "mobicloud-profile-page-customer-user", inputs: ["isLoadingData", "loadingText", "hasErrors", "errorCaption", "errorText", "enableRetryOnError"], outputs: ["user"] }, { kind: "component", type: i6.ProfilePageVendorUserComponent, selector: "mobicloud-profile-page-vendor-user" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ProfilePageComponent, decorators: [{
            type: Component,
            args: [{ selector: 'mobicloud-profile-page', template: "<div class=\"profile-container\">    \n\n    <mobicloud-profile-page-system-user *ngIf=\"isSystemUser\"></mobicloud-profile-page-system-user>\n    <mobicloud-profile-page-employee *ngIf=\"isEmployee\"></mobicloud-profile-page-employee>\n    <mobicloud-profile-page-customer-user *ngIf=\"isCustomerUser\"></mobicloud-profile-page-customer-user>\n    <mobicloud-profile-page-vendor-user *ngIf=\"isVendorUser\"></mobicloud-profile-page-vendor-user>\n\n</div>\n", styles: [".profile-container{margin:20px 20px 10px}\n"] }]
        }], ctorParameters: () => [{ type: i1.MobicloudCoreService }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZmlsZS1wYWdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2NvbXBvbmVudHMvcHJvZmlsZS9wcm9maWxlLXBhZ2UvcHJvZmlsZS1wYWdlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL2NvbXBvbmVudHMvcHJvZmlsZS9wcm9maWxlLXBhZ2UvcHJvZmlsZS1wYWdlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ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