import { Component, Inject, Input } from '@angular/core';
import { RouterHistoryService } from '@aztrix/helpers';
import { ACCOUNT_BACK } from '../tokens';
import * as i0 from "@angular/core";
import * as i1 from "@aztrix/helpers";
import * as i2 from "@angular/common";
import * as i3 from "@aztrix/components/button";
import * as i4 from "@aztrix/icons";
export class AccountNavigationComponent {
    constructor(_routerHistory, back) {
        this._routerHistory = _routerHistory;
        this.back = back;
    }
    goBack() {
        this._routerHistory.back('/account');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccountNavigationComponent, deps: [{ token: i1.RouterHistoryService }, { token: ACCOUNT_BACK }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AccountNavigationComponent, selector: "ax-account-navigation", inputs: { title: "title" }, ngImport: i0, template: "<button *ngIf=\"back\" axButton filled [ariaLabel]=\"'label.back' | translate\" (click)=\"goBack()\">\n  <ax-icon class=\"icon\" name=\"arrow-left\"></ax-icon>\n  {{ 'label.back' | translate }}\n</button>\n<h2>{{ title }}</h2>\n<span class=\"content\"><ng-content></ng-content></span>\n", styles: [":host{display:flex;align-items:center;gap:1rem;width:100%;max-width:var(--container-max-width);margin:0 auto}h2{margin:0}.content{margin-left:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[axButton]", inputs: ["color", "labelHideMobile", "smallButton", "bigButton", "fullWidth", "filled", "outline", "icon-button", "hoverLabel", "hover", "lowercase", "disabled"] }, { kind: "component", type: i4.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccountNavigationComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-account-navigation', template: "<button *ngIf=\"back\" axButton filled [ariaLabel]=\"'label.back' | translate\" (click)=\"goBack()\">\n  <ax-icon class=\"icon\" name=\"arrow-left\"></ax-icon>\n  {{ 'label.back' | translate }}\n</button>\n<h2>{{ title }}</h2>\n<span class=\"content\"><ng-content></ng-content></span>\n", styles: [":host{display:flex;align-items:center;gap:1rem;width:100%;max-width:var(--container-max-width);margin:0 auto}h2{margin:0}.content{margin-left:auto}\n"] }]
        }], ctorParameters: () => [{ type: i1.RouterHistoryService }, { type: undefined, decorators: [{
                    type: Inject,
                    args: [ACCOUNT_BACK]
                }] }], propDecorators: { title: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudC1uYXZpZ2F0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hY2NvdW50L2FjY291bnQtbmF2aWdhdGlvbi9hY2NvdW50LW5hdmlnYXRpb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2FjY291bnQvYWNjb3VudC1uYXZpZ2F0aW9uL2FjY291bnQtbmF2aWdhdGlvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdkQsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFFckQsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLFdBQVcsQ0FBQzs7Ozs7O0FBT3ZDLE1BQU0sT0FBTywwQkFBMEI7SUFHckMsWUFDVSxjQUFvQyxFQUNmLElBQWE7UUFEbEMsbUJBQWMsR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