import { Component, Input } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import * as i0 from "@angular/core";
import * as i1 from "@angular/router";
import * as i2 from "primeng/button";
import * as i3 from "primeng/ripple";
export class GlobalErrorComponent {
    constructor(router, route) {
        this.router = router;
        this.route = route;
        this.errCode = this.route.snapshot.queryParamMap.get('err') || 'E1001_FAILED_START';
        this.backUrl = this.route.snapshot.queryParamMap.get('return') || '/';
    }
    onGoBack() {
        this.router.navigateByUrl(this.backUrl);
    }
    reload() {
        window.location.reload();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GlobalErrorComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: GlobalErrorComponent, selector: "ocx-error", inputs: { errCode: "errCode" }, ngImport: i0, template: "<div class=\"pages-body error-page flex flex-column\">\n  <div class=\"align-self-center mt-auto mb-auto\">\n    <div class=\"pages-panel card flex flex-column\">\n      <div class=\"pages-header px-3 py-1\">\n        <h2>ERROR</h2>\n      </div>\n      <div class=\"card mt-3 px-6\">\n        <img src=\"assets/images/error.png\" alt=\"\" />\n      </div>\n      <div class=\"pages-detail pb-6\">{{errCode}}</div>\n      <button pButton pRipple type=\"button\" label=\"Try Again\" (click)=\"reload()\" class=\"p-button-text\"></button>\n    </div>\n  </div>\n</div>\n", styles: [".pages-body{height:100vh}.pages-body .topbar{box-shadow:0 2px 5px #00000042;background-color:#1565c0;z-index:100}.pages-body .topbar .topbar-left img{height:2rem}.pages-body .topbar .p-button.p-button-text.p-button-plain{color:#fff}.pages-body .pages-panel{text-align:center;z-index:200}.pages-body .pages-panel.card{border:1.5px solid var(--divider-color, var(--divider-color-default));border-radius:6px}.pages-body .pages-panel.card img{width:100%}.pages-body .pages-panel.card>.card{background-color:var(--content-alt-bg-color, var(--content-alt-bg-color-default))}.pages-body .pages-panel .pages-header{margin-top:-3rem;color:var(--primary-color-text);border:1.5px solid var(--divider-color, var(--divider-color-default));border-radius:4px;margin-left:auto;margin-right:auto}.pages-body .pages-panel .pages-header h2{margin:0}.pages-body .pages-panel .pages-detail{color:var(--text-secondary-color, var(--text-secondary-color-default))}.pages-body.error-page{background-size:cover;background-color:var(--primary-color, var(--primary-color-default))}.pages-body.error-page .pages-panel .pages-header{background:#d81b60}.pages-body.notfound-page{background-size:cover}.pages-body.notfound-page .pages-panel .pages-header{background:#455a64}.pages-body.accessdenied-page{background-size:cover}.pages-body.accessdenied-page .pages-panel .pages-header{background:#fb8c00}@media screen and (max-width: 768px){.pages-body.contact-page .pages-panel{padding-bottom:10em}.pages-body.contact-page .pages-panel .p-button{width:100%}.pages-body.contact-page .pages-panel .card .right-panel{text-align:center}}\n"], dependencies: [{ kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i3.Ripple, selector: "[pRipple]" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GlobalErrorComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ocx-error', template: "<div class=\"pages-body error-page flex flex-column\">\n  <div class=\"align-self-center mt-auto mb-auto\">\n    <div class=\"pages-panel card flex flex-column\">\n      <div class=\"pages-header px-3 py-1\">\n        <h2>ERROR</h2>\n      </div>\n      <div class=\"card mt-3 px-6\">\n        <img src=\"assets/images/error.png\" alt=\"\" />\n      </div>\n      <div class=\"pages-detail pb-6\">{{errCode}}</div>\n      <button pButton pRipple type=\"button\" label=\"Try Again\" (click)=\"reload()\" class=\"p-button-text\"></button>\n    </div>\n  </div>\n</div>\n", styles: [".pages-body{height:100vh}.pages-body .topbar{box-shadow:0 2px 5px #00000042;background-color:#1565c0;z-index:100}.pages-body .topbar .topbar-left img{height:2rem}.pages-body .topbar .p-button.p-button-text.p-button-plain{color:#fff}.pages-body .pages-panel{text-align:center;z-index:200}.pages-body .pages-panel.card{border:1.5px solid var(--divider-color, var(--divider-color-default));border-radius:6px}.pages-body .pages-panel.card img{width:100%}.pages-body .pages-panel.card>.card{background-color:var(--content-alt-bg-color, var(--content-alt-bg-color-default))}.pages-body .pages-panel .pages-header{margin-top:-3rem;color:var(--primary-color-text);border:1.5px solid var(--divider-color, var(--divider-color-default));border-radius:4px;margin-left:auto;margin-right:auto}.pages-body .pages-panel .pages-header h2{margin:0}.pages-body .pages-panel .pages-detail{color:var(--text-secondary-color, var(--text-secondary-color-default))}.pages-body.error-page{background-size:cover;background-color:var(--primary-color, var(--primary-color-default))}.pages-body.error-page .pages-panel .pages-header{background:#d81b60}.pages-body.notfound-page{background-size:cover}.pages-body.notfound-page .pages-panel .pages-header{background:#455a64}.pages-body.accessdenied-page{background-size:cover}.pages-body.accessdenied-page .pages-panel .pages-header{background:#fb8c00}@media screen and (max-width: 768px){.pages-body.contact-page .pages-panel{padding-bottom:10em}.pages-body.contact-page .pages-panel .p-button{width:100%}.pages-body.contact-page .pages-panel .card .right-panel{text-align:center}}\n"] }]
        }], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }], propDecorators: { errCode: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsLWVycm9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvcG9ydGFsLWludGVncmF0aW9uLWFuZ3VsYXIvc3JjL2xpYi9jb3JlL2NvbXBvbmVudHMvZXJyb3ItY29tcG9uZW50L2dsb2JhbC1lcnJvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3BvcnRhbC1pbnRlZ3JhdGlvbi1hbmd1bGF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