import { CdkStepper, CdkStepperModule } from '@angular/cdk/stepper';
import * as i0 from '@angular/core';
import { Component, Input, HostBinding, Injectable, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { HammerGestureConfig, HammerModule, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
import * as Hammer from 'hammerjs';

class ContentStepperComponent extends CdkStepper {
    constructor() {
        super(...arguments);
        this.interactable = true;
        this.reverse = false;
    }
    onClick(index) {
        this.selectedIndex = index;
    }
}
ContentStepperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ContentStepperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
ContentStepperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: ContentStepperComponent, selector: "ax-content-stepper", inputs: { mode: "mode", interactable: "interactable", reverse: "reverse" }, host: { properties: { "class.reverse": "this.reverse" } }, providers: [{ provide: CdkStepper, useExisting: ContentStepperComponent }], usesInheritance: true, ngImport: i0, template: "<div\n  *ngIf=\"mode === 'VERTICAL'\"\n  class=\"stepper-wrapper stepper-wrapper-vertical\"\n  (swipeup)=\"interactable ? next() : undefined\"\n  (swipedown)=\"interactable ? previous() : undefined\"\n>\n  <div class=\"step-content\" [ngClass]=\"{selected}\">\n    <ng-container [ngTemplateOutlet]=\"selected.content\"></ng-container>\n  </div>\n  <div class=\"stepper-buttons\">\n    <button\n      [disabled]=\"!interactable\"\n      class=\"step-button\"\n      *ngFor=\"let step of steps; let i = index\"\n      [ngClass]=\"{'is-active': selectedIndex === i}\"\n      (click)=\"interactable ? onClick(i) : undefined\"\n    ></button>\n  </div>\n</div>\n\n<div\n  *ngIf=\"mode === 'HORIZONTAL'\"\n  class=\"stepper-wrapper stepper-wrapper-horizontal\"\n  (swipeleft)=\"interactable ? next() : undefined\"\n  (swiperight)=\"interactable ? previous() : undefined\"\n>\n  <div class=\"step-content\" [ngClass]=\"{selected}\">\n    <ng-container [ngTemplateOutlet]=\"selected.content\"></ng-container>\n  </div>\n  <div class=\"stepper-buttons\">\n    <button\n      [disabled]=\"!interactable\"\n      class=\"step-button\"\n      *ngFor=\"let step of steps; let i = index\"\n      [ngClass]=\"{'is-active': selectedIndex === i}\"\n      (click)=\"interactable ? onClick(i) : undefined\"\n    ></button>\n  </div>\n</div>\n", styles: [":host.reverse .stepper-wrapper-horizontal{flex-direction:column-reverse}:host.reverse .stepper-wrapper-vertical{flex-direction:row-reverse}.stepper-wrapper{display:flex;height:100%}.stepper-wrapper-vertical .stepper-buttons{flex-direction:column}.stepper-wrapper-vertical .step-button:first-child{margin-top:0}.stepper-wrapper-vertical .step-button:last-child{margin-bottom:0}.stepper-wrapper-horizontal{flex-direction:column}.stepper-wrapper-horizontal .stepper-buttons{flex-direction:row}.step-content{flex:1 0 auto;display:block;visibility:hidden;opacity:0;position:absolute}.step-content.selected{position:relative;visibility:visible;opacity:1}.stepper-buttons{display:flex;justify-content:center;align-items:center;padding:6px}.step-button{border:2px solid var(--primary-color-500);outline:0;background-color:transparent;width:12px;height:12px;padding:0;border-radius:10px;margin:2px;cursor:pointer}.step-button.is-active{background-color:var(--primary-color-500)}.step-button:disabled{cursor:default}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ContentStepperComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-content-stepper', providers: [{ provide: CdkStepper, useExisting: ContentStepperComponent }], template: "<div\n  *ngIf=\"mode === 'VERTICAL'\"\n  class=\"stepper-wrapper stepper-wrapper-vertical\"\n  (swipeup)=\"interactable ? next() : undefined\"\n  (swipedown)=\"interactable ? previous() : undefined\"\n>\n  <div class=\"step-content\" [ngClass]=\"{selected}\">\n    <ng-container [ngTemplateOutlet]=\"selected.content\"></ng-container>\n  </div>\n  <div class=\"stepper-buttons\">\n    <button\n      [disabled]=\"!interactable\"\n      class=\"step-button\"\n      *ngFor=\"let step of steps; let i = index\"\n      [ngClass]=\"{'is-active': selectedIndex === i}\"\n      (click)=\"interactable ? onClick(i) : undefined\"\n    ></button>\n  </div>\n</div>\n\n<div\n  *ngIf=\"mode === 'HORIZONTAL'\"\n  class=\"stepper-wrapper stepper-wrapper-horizontal\"\n  (swipeleft)=\"interactable ? next() : undefined\"\n  (swiperight)=\"interactable ? previous() : undefined\"\n>\n  <div class=\"step-content\" [ngClass]=\"{selected}\">\n    <ng-container [ngTemplateOutlet]=\"selected.content\"></ng-container>\n  </div>\n  <div class=\"stepper-buttons\">\n    <button\n      [disabled]=\"!interactable\"\n      class=\"step-button\"\n      *ngFor=\"let step of steps; let i = index\"\n      [ngClass]=\"{'is-active': selectedIndex === i}\"\n      (click)=\"interactable ? onClick(i) : undefined\"\n    ></button>\n  </div>\n</div>\n", styles: [":host.reverse .stepper-wrapper-horizontal{flex-direction:column-reverse}:host.reverse .stepper-wrapper-vertical{flex-direction:row-reverse}.stepper-wrapper{display:flex;height:100%}.stepper-wrapper-vertical .stepper-buttons{flex-direction:column}.stepper-wrapper-vertical .step-button:first-child{margin-top:0}.stepper-wrapper-vertical .step-button:last-child{margin-bottom:0}.stepper-wrapper-horizontal{flex-direction:column}.stepper-wrapper-horizontal .stepper-buttons{flex-direction:row}.step-content{flex:1 0 auto;display:block;visibility:hidden;opacity:0;position:absolute}.step-content.selected{position:relative;visibility:visible;opacity:1}.stepper-buttons{display:flex;justify-content:center;align-items:center;padding:6px}.step-button{border:2px solid var(--primary-color-500);outline:0;background-color:transparent;width:12px;height:12px;padding:0;border-radius:10px;margin:2px;cursor:pointer}.step-button.is-active{background-color:var(--primary-color-500)}.step-button:disabled{cursor:default}\n"] }]
        }], propDecorators: { mode: [{
                type: Input
            }], interactable: [{
                type: Input
            }], reverse: [{
                type: HostBinding,
                args: ['class.reverse']
            }, {
                type: Input
            }] } });

class MyHammerConfig extends HammerGestureConfig {
    constructor() {
        super(...arguments);
        this.overrides = {
            swipe: { direction: Hammer.DIRECTION_ALL },
        };
    }
}
MyHammerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: MyHammerConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
MyHammerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: MyHammerConfig });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: MyHammerConfig, decorators: [{
            type: Injectable
        }] });
class ContentStepperModule {
}
ContentStepperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ContentStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
ContentStepperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.5", ngImport: i0, type: ContentStepperModule, declarations: [ContentStepperComponent], imports: [CommonModule, CdkStepperModule, HammerModule], exports: [ContentStepperComponent] });
ContentStepperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ContentStepperModule, providers: [
        {
            provide: HAMMER_GESTURE_CONFIG,
            useClass: MyHammerConfig,
        },
    ], imports: [CommonModule, CdkStepperModule, HammerModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: ContentStepperModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [ContentStepperComponent],
                    imports: [CommonModule, CdkStepperModule, HammerModule],
                    exports: [ContentStepperComponent],
                    providers: [
                        {
                            provide: HAMMER_GESTURE_CONFIG,
                            useClass: MyHammerConfig,
                        },
                    ],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { ContentStepperComponent, ContentStepperModule, MyHammerConfig };
//# sourceMappingURL=aztrix-components-content-stepper.mjs.map
//# sourceMappingURL=aztrix-components-content-stepper.mjs.map
