import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
import * as i1$1 from '@aztrix/components/overlay';
import { ModalSize } from '@aztrix/components/overlay';
import * as i1 from '@aztrix/components/image-source';
import { ImageSourceModule } from '@aztrix/components/image-source';
import * as i2 from '@aztrix/icons';
import { IconsModule } from '@aztrix/icons';
import * as i3 from '@aztrix/helpers';
import { HelperPipesModule } from '@aztrix/helpers';
import * as i2$1 from '@aztrix/components/button';
import { ButtonModule } from '@aztrix/components/button';
import { CommonModule } from '@angular/common';

class ImagePreviewComponent {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ImagePreviewComponent, selector: "ax-image-preview", inputs: { source: "source", name: "name" }, ngImport: i0, template: "<ax-image-source [source]=\"source\" [actualSize]=\"true\">\n  <ax-icon class=\"icon\" name=\"image\"></ax-icon>\n</ax-image-source>\n<p>{{ 'label.import.source' | translate }}: {{ name }}</p>\n", styles: [":host{display:block;margin:10px}\n"], dependencies: [{ kind: "component", type: i1.ImageSourceComponent, selector: "ax-image-source", inputs: ["source", "fallbackSource", "actualSize", "alt", "round", "rounded", "border"] }, { kind: "component", type: i2.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-image-preview', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-image-source [source]=\"source\" [actualSize]=\"true\">\n  <ax-icon class=\"icon\" name=\"image\"></ax-icon>\n</ax-image-source>\n<p>{{ 'label.import.source' | translate }}: {{ name }}</p>\n", styles: [":host{display:block;margin:10px}\n"] }]
        }], propDecorators: { source: [{
                type: Input
            }], name: [{
                type: Input
            }] } });

class ImagePreviewButtonComponent {
    constructor(_overlay, _elementRef) {
        this._overlay = _overlay;
        this._elementRef = _elementRef;
    }
    preview() {
        this._overlay.createModal(this._elementRef, ImagePreviewComponent, {
            title: 'label.preview',
            modalSize: ModalSize.SMALL,
            init: (modal) => {
                modal.source = this.source;
                modal.name = this.name;
            },
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewButtonComponent, deps: [{ token: i1$1.OverlayService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ImagePreviewButtonComponent, selector: "ax-image-preview-button", inputs: { source: "source", name: "name" }, ngImport: i0, template: "<button axButton button-filled color=\"white\" [hidden]=\"!source\" (click)=\"preview()\">\n  <ax-image-source [source]=\"source\">\n    <ax-icon class=\"icon\" name=\"image\"></ax-icon>\n  </ax-image-source>\n</button>\n", styles: ["button{width:1.5rem;height:1.5rem;min-width:0;padding:0;overflow:hidden}button[hidden]{display:none}\n"], dependencies: [{ kind: "directive", type: i2$1.ButtonDirective, selector: "[axButton]", inputs: ["color", "labelHideMobile", "smallButton", "bigButton", "fullWidth", "filled", "outline", "icon-button", "hoverLabel", "hover", "lowercase", "disabled"] }, { kind: "component", type: i1.ImageSourceComponent, selector: "ax-image-source", inputs: ["source", "fallbackSource", "actualSize", "alt", "round", "rounded", "border"] }, { kind: "component", type: i2.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-image-preview-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button axButton button-filled color=\"white\" [hidden]=\"!source\" (click)=\"preview()\">\n  <ax-image-source [source]=\"source\">\n    <ax-icon class=\"icon\" name=\"image\"></ax-icon>\n  </ax-image-source>\n</button>\n", styles: ["button{width:1.5rem;height:1.5rem;min-width:0;padding:0;overflow:hidden}button[hidden]{display:none}\n"] }]
        }], ctorParameters: () => [{ type: i1$1.OverlayService }, { type: i0.ElementRef }], propDecorators: { source: [{
                type: Input
            }], name: [{
                type: Input
            }] } });

class ImagePreviewButtonModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewButtonModule, declarations: [ImagePreviewButtonComponent, ImagePreviewComponent], imports: [CommonModule, ButtonModule, ImageSourceModule, HelperPipesModule, IconsModule], exports: [ImagePreviewButtonComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewButtonModule, imports: [CommonModule, ButtonModule, ImageSourceModule, HelperPipesModule, IconsModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImagePreviewButtonModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [ImagePreviewButtonComponent, ImagePreviewComponent],
                    imports: [CommonModule, ButtonModule, ImageSourceModule, HelperPipesModule, IconsModule],
                    exports: [ImagePreviewButtonComponent],
                }]
        }] });

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

export { ImagePreviewButtonComponent, ImagePreviewButtonModule };
//# sourceMappingURL=aztrix-components-image-preview-button.mjs.map
