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";
import * as i5 from "@aztrix/translate";
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: i5.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudC1uYXZpZ2F0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9hY2NvdW50L2FjY291bnQtbmF2aWdhdGlvbi9hY2NvdW50LW5hdmlnYXRpb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2FjY291bnQvYWNjb3VudC1uYXZpZ2F0aW9uL2FjY291bnQtbmF2aWdhdGlvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdkQsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFFckQsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLFdBQVcsQ0FBQzs7Ozs7OztBQU92QyxNQUFNLE9BQU8sMEJBQTBCO0lBR3JDLFlBQ1UsY0FBb0MsRUFDZixJQUF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