import * as i3 from '@acorex/components/button';
import { AXButtonModule } from '@acorex/components/button';
import { AXPSessionService } from '@acorex/platform/auth';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { inject, Component } from '@angular/core';
import { Router } from '@angular/router';

class AXPError401Component {
    constructor() {
        this.sessionService = inject(AXPSessionService);
        this.router = inject(Router);
        this.isAuthorized$ = this.sessionService.isAuthorized$;
    }
    handleHomeClick() {
        this.router.navigate([`/${this.sessionService.application?.name}/home`]);
    }
    handleSignInClick() {
        this.router.navigate([`/auth/login`]);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPError401Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXPError401Component, isStandalone: true, selector: "axp-error-401", ngImport: i0, template: "<div class=\"ax-h-full ax-flex ax-flex-col ax-gap-8 ax-items-center ax-justify-center\">\n    <img class=\"ax-w-3/4 md:ax-w-1/2 lg:ax-w-1/3 xl:ax-w-1/4\" src=\"/assets/images/error/error-401.svg\"\n        alt=\"Oops! Error 404. No result found.\">\n    <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2 md:ax-gap-4\">\n        <h1 class=\"ax-font-bold ax-text-2xl md:ax-text-4xl\">Hold on a second!</h1>\n        <p class=\"md:ax-text-lg ax-text-neutral-400\">Sorry, but you are not authorized to view this page.</p>\n    </div>\n    <div class=\"ax-flex ax-flex-col ax-gap-2 md:ax-gap-4 md:ax-flex-row\">\n        @if((isAuthorized$ | async))\n        {\n        <ax-button (onClick)=\"handleHomeClick()\" class=\"ax-px-4\" color=\"primary\" text=\"Go back to home\"></ax-button>\n        } @else {\n        <ax-button (onClick)=\"handleSignInClick()\" class=\"ax-px-4\" color=\"primary\" text=\"Sign Up / Sign In\"></ax-button>\n        }\n        <ax-button class=\"ax-px-4\" [color]=\"'default'\" text=\"Contact us\"></ax-button>\n    </div>\n</div>", dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPError401Component, decorators: [{
            type: Component,
            args: [{ selector: 'axp-error-401', imports: [AXButtonModule, CommonModule], template: "<div class=\"ax-h-full ax-flex ax-flex-col ax-gap-8 ax-items-center ax-justify-center\">\n    <img class=\"ax-w-3/4 md:ax-w-1/2 lg:ax-w-1/3 xl:ax-w-1/4\" src=\"/assets/images/error/error-401.svg\"\n        alt=\"Oops! Error 404. No result found.\">\n    <div class=\"ax-flex ax-flex-col ax-items-center ax-gap-2 md:ax-gap-4\">\n        <h1 class=\"ax-font-bold ax-text-2xl md:ax-text-4xl\">Hold on a second!</h1>\n        <p class=\"md:ax-text-lg ax-text-neutral-400\">Sorry, but you are not authorized to view this page.</p>\n    </div>\n    <div class=\"ax-flex ax-flex-col ax-gap-2 md:ax-gap-4 md:ax-flex-row\">\n        @if((isAuthorized$ | async))\n        {\n        <ax-button (onClick)=\"handleHomeClick()\" class=\"ax-px-4\" color=\"primary\" text=\"Go back to home\"></ax-button>\n        } @else {\n        <ax-button (onClick)=\"handleSignInClick()\" class=\"ax-px-4\" color=\"primary\" text=\"Sign Up / Sign In\"></ax-button>\n        }\n        <ax-button class=\"ax-px-4\" [color]=\"'default'\" text=\"Contact us\"></ax-button>\n    </div>\n</div>" }]
        }] });

export { AXPError401Component };
//# sourceMappingURL=acorex-platform-themes-default-error-401.component-D9NZ-6L_.mjs.map
