import { Component, Input, Output, EventEmitter, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonButton, IonIcon, IonSpinner } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons';
import { downloadOutline, copyOutline, shareOutline } from 'ionicons/icons';
import { QrGeneratorService } from '../../../services/qr-generator/qr-generator.service';
import { I18nService } from '../../../services/i18n';
import * as i0 from "@angular/core";
addIcons({ downloadOutline, copyOutline, shareOutline });
/**
 * val-qr-code
 *
 * A component to display QR codes generated by QrGeneratorService.
 * Provides optional action buttons for download, copy, and share.
 *
 * @example Basic usage
 * ```typescript
 * qr = await this.qrService.generate({ data: 'https://example.com' });
 * ```
 * ```html
 * <val-qr-code [props]="{ qr: qr }"></val-qr-code>
 * ```
 *
 * @example With actions
 * ```html
 * <val-qr-code
 *   [props]="{
 *     qr: qr,
 *     showDownload: true,
 *     showCopy: true,
 *     showShare: true,
 *     displaySize: 200,
 *     showBorder: true,
 *     borderRadius: 12
 *   }"
 *   (actionComplete)="onAction($event)"
 * ></val-qr-code>
 * ```
 *
 * @input props: QrCodeMetadata - Configuration for the QR display
 * @output actionComplete - Emits when an action (download/copy/share) completes
 * @output imageLoad - Emits when the QR image loads
 * @output imageError - Emits when the QR image fails to load
 */
export class QrCodeComponent {
    constructor() {
        this.actionComplete = new EventEmitter();
        this.imageLoad = new EventEmitter();
        this.imageError = new EventEmitter();
        this.canShare = false;
        this.canCopy = false;
        this.qrService = inject(QrGeneratorService);
        this.i18n = inject(I18nService);
    }
    ngOnInit() {
        this.canShare = this.qrService.canShare();
        this.canCopy = this.qrService.canCopyToClipboard();
    }
    getDisplaySize() {
        if (this.props.displaySize) {
            return `${this.props.displaySize}px`;
        }
        return `${this.props.qr.config.width || 300}px`;
    }
    getBorderRadius() {
        return this.props.borderRadius ? `${this.props.borderRadius}px` : '0';
    }
    getPadding() {
        return this.props.padding ? `${this.props.padding}px` : '0';
    }
    getQrBorderRadius() {
        return this.props.qrBorderRadius ? `${this.props.qrBorderRadius}px` : '0';
    }
    getContainerClasses() {
        const classes = [];
        if (this.props.cssClass)
            classes.push(this.props.cssClass);
        if (this.props.showBorder)
            classes.push('with-border');
        if (this.props.loading)
            classes.push('loading');
        if (this.props.theme)
            classes.push(`theme--${this.props.theme}`);
        if (this.props.pulseOnHover)
            classes.push('pulse-on-hover');
        if (this.props.scaleOnHover)
            classes.push('scale-on-hover');
        if (this.props.gradient)
            classes.push('has-gradient');
        return classes.join(' ');
    }
    getContainerBackground() {
        if (this.props.gradient) {
            const { from, to, via, direction = 'to-bottom' } = this.props.gradient;
            const cssDirection = direction.replace(/-/g, ' ');
            if (via) {
                return `linear-gradient(${cssDirection}, ${from}, ${via}, ${to})`;
            }
            return `linear-gradient(${cssDirection}, ${from}, ${to})`;
        }
        return this.props.containerBackground || 'transparent';
    }
    getShadow() {
        const shadowMap = {
            none: 'none',
            sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
            md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
            lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
            xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
        };
        if (!this.props.shadow)
            return 'none';
        return shadowMap[this.props.shadow] || this.props.shadow;
    }
    getLabelFontSize() {
        return this.props.label?.fontSize ? `${this.props.label.fontSize}px` : '14px';
    }
    hasActions() {
        return !!(this.props.showDownload || this.props.showCopy || this.props.showShare);
    }
    getDownloadLabel() {
        return this.props.downloadLabel || this.i18n.t('download');
    }
    getCopyLabel() {
        return this.props.copyLabel || this.i18n.t('copy');
    }
    getShareLabel() {
        return this.props.shareLabel || this.i18n.t('share');
    }
    async onDownload() {
        try {
            const options = this.props.downloadFilename ? { filename: this.props.downloadFilename } : undefined;
            await this.qrService.download(this.props.qr, options);
            this.actionComplete.emit({
                action: 'download',
                success: true,
                qr: this.props.qr,
            });
        }
        catch (error) {
            this.actionComplete.emit({
                action: 'download',
                success: false,
                qr: this.props.qr,
                error: error,
            });
        }
    }
    async onCopy() {
        try {
            const success = await this.qrService.copyToClipboard(this.props.qr);
            this.actionComplete.emit({
                action: 'copy',
                success,
                qr: this.props.qr,
            });
        }
        catch (error) {
            this.actionComplete.emit({
                action: 'copy',
                success: false,
                qr: this.props.qr,
                error: error,
            });
        }
    }
    async onShare() {
        try {
            const options = {};
            if (this.props.shareTitle)
                options.title = this.props.shareTitle;
            if (this.props.shareText)
                options.text = this.props.shareText;
            if (this.props.shareFilename)
                options.filename = this.props.shareFilename;
            const success = await this.qrService.share(this.props.qr, Object.keys(options).length > 0 ? options : undefined);
            this.actionComplete.emit({
                action: 'share',
                success,
                qr: this.props.qr,
            });
        }
        catch (error) {
            this.actionComplete.emit({
                action: 'share',
                success: false,
                qr: this.props.qr,
                error: error,
            });
        }
    }
    onImageLoad() {
        this.imageLoad.emit();
    }
    onImageError(_event) {
        const error = new Error('Failed to load QR code image');
        this.imageError.emit(error);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QrCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: QrCodeComponent, isStandalone: true, selector: "val-qr-code", inputs: { props: "props" }, outputs: { actionComplete: "actionComplete", imageLoad: "imageLoad", imageError: "imageError" }, ngImport: i0, template: `
    <div
      class="qr-code-container"
      [class]="getContainerClasses()"
      [style.--border-radius]="getBorderRadius()"
      [style.--padding]="getPadding()"
      [style.--container-bg]="getContainerBackground()"
      [style.--border-color]="props.borderColor || 'var(--ion-color-light-shade)'"
      [style.--shadow]="getShadow()"
      [style.--glow-color]="props.glowColor || '#8b5cf6'"
      [style.--qr-border-radius]="getQrBorderRadius()"
    >
      @if (props.loading) {
        <div class="loading-overlay">
          <ion-spinner name="circular"></ion-spinner>
        </div>
      }

      @if (props.label && props.label.position === 'top') {
        <div
          class="qr-label qr-label--top"
          [style.--label-color]="props.label.color || 'inherit'"
          [style.--label-size]="getLabelFontSize()"
        >
          @if (props.label.icon && props.label.iconPosition !== 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
          <span [class]="'font-weight--' + (props.label.fontWeight || 'medium')">{{ props.label.text }}</span>
          @if (props.label.icon && props.label.iconPosition === 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
        </div>
      }

      <div class="qr-image-wrapper" [style.--size]="getDisplaySize()">
        <img
          [src]="props.qr.dataUrl"
          [alt]="props.alt || 'QR Code'"
          class="qr-image"
          (load)="onImageLoad()"
          (error)="onImageError($event)"
        />
      </div>

      @if (props.label && props.label.position !== 'top') {
        <div
          class="qr-label qr-label--bottom"
          [style.--label-color]="props.label.color || 'inherit'"
          [style.--label-size]="getLabelFontSize()"
        >
          @if (props.label.icon && props.label.iconPosition !== 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
          <span [class]="'font-weight--' + (props.label.fontWeight || 'medium')">{{ props.label.text }}</span>
          @if (props.label.icon && props.label.iconPosition === 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
        </div>
      }

      @if (hasActions()) {
        <div class="qr-actions">
          @if (props.showDownload) {
            <ion-button fill="clear" size="small" (click)="onDownload()" [title]="getDownloadLabel()">
              <ion-icon name="download-outline" slot="icon-only"></ion-icon>
            </ion-button>
          }

          @if (props.showCopy && canCopy) {
            <ion-button fill="clear" size="small" (click)="onCopy()" [title]="getCopyLabel()">
              <ion-icon name="copy-outline" slot="icon-only"></ion-icon>
            </ion-button>
          }

          @if (props.showShare && canShare) {
            <ion-button fill="clear" size="small" (click)="onShare()" [title]="getShareLabel()">
              <ion-icon name="share-outline" slot="icon-only"></ion-icon>
            </ion-button>
          }
        </div>
      }
    </div>
  `, isInline: true, styles: ["@charset \"UTF-8\";:root{--val-container-sm: 540px;--val-container-md: 720px;--val-container-lg: 880px;--val-container-xl: 1100px;--val-container-padding: 16px;--ion-color-primary: #7026df;--ion-color-primary-rgb: 112, 38, 223;--ion-color-primary-contrast: #ffffff;--ion-color-primary-contrast-rgb: 255, 255, 255;--ion-color-primary-shade: #6321c4;--ion-color-primary-tint: #7e3ce2;--ion-color-secondary: #e2ccff;--ion-color-secondary-rgb: 226, 204, 255;--ion-color-secondary-contrast: #000000;--ion-color-secondary-contrast-rgb: 0, 0, 0;--ion-color-secondary-shade: #c7b4e0;--ion-color-secondary-tint: #e5d1ff;--ion-color-texti: #354c69;--ion-color-texti-rgb: 53, 76, 105;--ion-color-texti-contrast: #ffffff;--ion-color-texti-contrast-rgb: 255, 255, 255;--ion-color-texti-shade: #2f435c;--ion-color-texti-tint: #495e78;--ion-color-darki: #090f1b;--ion-color-darki-rgb: 9, 15, 27;--ion-color-darki-contrast: #ffffff;--ion-color-darki-contrast-rgb: 255, 255, 255;--ion-color-darki-shade: #080d18;--ion-color-darki-tint: #222732;--ion-color-medium: #9e9e9e;--ion-color-medium-rgb: 158, 158, 158;--ion-color-medium-contrast: #000000;--ion-color-medium-contrast-rgb: 0, 0, 0;--ion-color-medium-shade: #8b8b8b;--ion-color-medium-tint: #a8a8a8;--swiper-pagination-color: var(--ion-color-primary);--swiper-navigation-color: var(--ion-color-primary);--swiper-pagination-bullet-inactive-color: var(--ion-color-medium)}body.dark,html.ion-palette-dark,body[data-theme=dark]{--ion-color-texti: #8fc1ff;--ion-color-texti-rgb: 143, 193, 255;--ion-color-texti-contrast: #000000;--ion-color-texti-contrast-rgb: 0, 0, 0;--ion-color-texti-shade: #7eaae0;--ion-color-texti-tint: #9ac7ff;--ion-color-darki: #ffffff;--ion-color-darki-rgb: 255, 255, 255;--ion-color-darki-contrast: #000000;--ion-color-darki-contrast-rgb: 0, 0, 0;--ion-color-darki-shade: #e0e0e0;--ion-color-darki-tint: #ffffff;--ion-color-primary: #8f49f8;--ion-color-primary-rgb: 143, 73, 248;--ion-color-primary-contrast: #ffffff;--ion-color-primary-contrast-rgb: 255, 255, 255;--ion-color-primary-shade: #7e40da;--ion-color-primary-tint: #9a5bf9}.ion-color-texti{--ion-color-base: var(--ion-color-texti);--ion-color-base-rgb: var(--ion-color-texti-rgb);--ion-color-contrast: var(--ion-color-texti-contrast);--ion-color-contrast-rgb: var(--ion-color-texti-contrast-rgb);--ion-color-shade: var(--ion-color-texti-shade);--ion-color-tint: var(--ion-color-texti-tint)}.ion-color-darki{--ion-color-base: var(--ion-color-darki);--ion-color-base-rgb: var(--ion-color-darki-rgb);--ion-color-contrast: var(--ion-color-darki-contrast);--ion-color-contrast-rgb: var(--ion-color-darki-contrast-rgb);--ion-color-shade: var(--ion-color-darki-shade);--ion-color-tint: var(--ion-color-darki-tint)}:host{display:inline-block}.qr-code-container{display:inline-flex;flex-direction:column;align-items:center;gap:12px;padding:var(--padding);background:var(--container-bg);border-radius:var(--border-radius);box-shadow:var(--shadow);position:relative;transition:transform .2s ease,box-shadow .2s ease}.qr-code-container.with-border{border:1px solid var(--border-color)}.qr-code-container.loading .qr-image-wrapper{opacity:.5}.qr-code-container.scale-on-hover:hover{transform:scale(1.02)}.qr-code-container.pulse-on-hover:hover{animation:pulse 1.5s infinite}.qr-label{display:flex;align-items:center;gap:6px;color:var(--label-color);font-size:var(--label-size)}.qr-label ion-icon{font-size:1.1em}.qr-label .font-weight--normal{font-weight:400}.qr-label .font-weight--medium{font-weight:500}.qr-label .font-weight--semibold{font-weight:600}.qr-label .font-weight--bold{font-weight:700}.qr-label--top{margin-bottom:4px}.qr-label--bottom{margin-top:4px}.loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#ffffffb3;border-radius:var(--border-radius);z-index:1}.loading-overlay ion-spinner{width:32px;height:32px}.qr-image-wrapper{width:var(--size);height:var(--size);display:flex;align-items:center;justify-content:center;transition:opacity .2s}.qr-image{width:100%;height:100%;object-fit:contain;display:block;border-radius:var(--qr-border-radius)}.qr-actions{display:flex;align-items:center;justify-content:center;gap:4px}.qr-actions ion-button{--padding-start: 8px;--padding-end: 8px;--color: var(--ion-color-medium)}.qr-actions ion-button:hover{--color: var(--ion-color-primary)}.qr-actions ion-button ion-icon{font-size:1.25rem}.theme--minimal{background:transparent!important;padding:0!important;box-shadow:none!important;border:none!important}.theme--gradient-purple{background:linear-gradient(135deg,#667eea,#764ba2)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-purple .qr-image{border-radius:8px}.theme--gradient-purple .qr-label{color:#fff}.theme--gradient-purple .qr-actions ion-button{--color: rgba(255, 255, 255, .8)}.theme--gradient-purple .qr-actions ion-button:hover{--color: white}.theme--gradient-blue{background:linear-gradient(135deg,#4facfe,#00f2fe)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-blue .qr-image{border-radius:8px}.theme--gradient-blue .qr-label{color:#fff}.theme--gradient-blue .qr-actions ion-button{--color: rgba(255, 255, 255, .8)}.theme--gradient-blue .qr-actions ion-button:hover{--color: white}.theme--gradient-sunset{background:linear-gradient(135deg,#fa709a,#fee140)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-sunset .qr-image{border-radius:8px}.theme--gradient-sunset .qr-label{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.1)}.theme--gradient-sunset .qr-actions ion-button{--color: rgba(255, 255, 255, .9)}.theme--gradient-sunset .qr-actions ion-button:hover{--color: white}.theme--gradient-mint{background:linear-gradient(135deg,#11998e,#38ef7d)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-mint .qr-image{border-radius:8px}.theme--gradient-mint .qr-label{color:#fff}.theme--gradient-mint .qr-actions ion-button{--color: rgba(255, 255, 255, .8)}.theme--gradient-mint .qr-actions ion-button:hover{--color: white}.theme--dark{background:linear-gradient(145deg,#1a1a2e,#16213e)!important;padding:20px!important;border-radius:16px!important;border:1px solid rgba(255,255,255,.1)!important}.theme--dark .qr-image{border-radius:8px;filter:invert(1)}.theme--dark .qr-label{color:#e0e0e0}.theme--dark .qr-actions ion-button{--color: rgba(255, 255, 255, .6)}.theme--dark .qr-actions ion-button:hover{--color: white}.theme--neon{background:#0a0a0a!important;padding:20px!important;border-radius:16px!important;border:2px solid var(--glow-color)!important;box-shadow:0 0 20px var(--glow-color),inset 0 0 20px #8b5cf61a!important}.theme--neon .qr-image{border-radius:8px;filter:drop-shadow(0 0 8px var(--glow-color))}.theme--neon .qr-label{color:var(--glow-color);text-shadow:0 0 10px var(--glow-color)}.theme--neon .qr-actions ion-button{--color: var(--glow-color)}.theme--neon .qr-actions ion-button:hover{--color: white}:host(.compact) .qr-actions{position:absolute;bottom:8px;left:50%;transform:translate(-50%);opacity:0;transition:opacity .2s;background-color:#ffffffe6;border-radius:8px;padding:4px}:host(.compact) .qr-code-container:hover .qr-actions{opacity:1}:host(.card) .qr-code-container{background-color:var(--ion-background-color, white);box-shadow:0 2px 8px #0000001a;padding:16px;border-radius:12px}@keyframes pulse{0%{box-shadow:var(--shadow),0 0 #6366f166}70%{box-shadow:var(--shadow),0 0 0 10px #6366f100}to{box-shadow:var(--shadow),0 0 #6366f100}}:host-context(body.dark) .loading-overlay,:host-context(.dark) .loading-overlay,:host-context(.ion-palette-dark) .loading-overlay,:host-context(html.ion-palette-dark) .loading-overlay,:host-context([data-theme=dark]) .loading-overlay{background-color:#000000b3}:host-context(body.dark).compact .qr-actions,:host-context(.dark).compact .qr-actions,:host-context(.ion-palette-dark).compact .qr-actions,:host-context(html.ion-palette-dark).compact .qr-actions,:host-context([data-theme=dark]).compact .qr-actions{background-color:#000000e6}:host-context(body.dark) .theme--default .qr-image,:host-context(.dark) .theme--default .qr-image,:host-context(.ion-palette-dark) .theme--default .qr-image,:host-context(html.ion-palette-dark) .theme--default .qr-image,:host-context([data-theme=dark]) .theme--default .qr-image{filter:invert(1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: QrCodeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'val-qr-code', standalone: true, imports: [CommonModule, IonButton, IonIcon, IonSpinner], template: `
    <div
      class="qr-code-container"
      [class]="getContainerClasses()"
      [style.--border-radius]="getBorderRadius()"
      [style.--padding]="getPadding()"
      [style.--container-bg]="getContainerBackground()"
      [style.--border-color]="props.borderColor || 'var(--ion-color-light-shade)'"
      [style.--shadow]="getShadow()"
      [style.--glow-color]="props.glowColor || '#8b5cf6'"
      [style.--qr-border-radius]="getQrBorderRadius()"
    >
      @if (props.loading) {
        <div class="loading-overlay">
          <ion-spinner name="circular"></ion-spinner>
        </div>
      }

      @if (props.label && props.label.position === 'top') {
        <div
          class="qr-label qr-label--top"
          [style.--label-color]="props.label.color || 'inherit'"
          [style.--label-size]="getLabelFontSize()"
        >
          @if (props.label.icon && props.label.iconPosition !== 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
          <span [class]="'font-weight--' + (props.label.fontWeight || 'medium')">{{ props.label.text }}</span>
          @if (props.label.icon && props.label.iconPosition === 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
        </div>
      }

      <div class="qr-image-wrapper" [style.--size]="getDisplaySize()">
        <img
          [src]="props.qr.dataUrl"
          [alt]="props.alt || 'QR Code'"
          class="qr-image"
          (load)="onImageLoad()"
          (error)="onImageError($event)"
        />
      </div>

      @if (props.label && props.label.position !== 'top') {
        <div
          class="qr-label qr-label--bottom"
          [style.--label-color]="props.label.color || 'inherit'"
          [style.--label-size]="getLabelFontSize()"
        >
          @if (props.label.icon && props.label.iconPosition !== 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
          <span [class]="'font-weight--' + (props.label.fontWeight || 'medium')">{{ props.label.text }}</span>
          @if (props.label.icon && props.label.iconPosition === 'end') {
            <ion-icon [name]="props.label.icon"></ion-icon>
          }
        </div>
      }

      @if (hasActions()) {
        <div class="qr-actions">
          @if (props.showDownload) {
            <ion-button fill="clear" size="small" (click)="onDownload()" [title]="getDownloadLabel()">
              <ion-icon name="download-outline" slot="icon-only"></ion-icon>
            </ion-button>
          }

          @if (props.showCopy && canCopy) {
            <ion-button fill="clear" size="small" (click)="onCopy()" [title]="getCopyLabel()">
              <ion-icon name="copy-outline" slot="icon-only"></ion-icon>
            </ion-button>
          }

          @if (props.showShare && canShare) {
            <ion-button fill="clear" size="small" (click)="onShare()" [title]="getShareLabel()">
              <ion-icon name="share-outline" slot="icon-only"></ion-icon>
            </ion-button>
          }
        </div>
      }
    </div>
  `, styles: ["@charset \"UTF-8\";:root{--val-container-sm: 540px;--val-container-md: 720px;--val-container-lg: 880px;--val-container-xl: 1100px;--val-container-padding: 16px;--ion-color-primary: #7026df;--ion-color-primary-rgb: 112, 38, 223;--ion-color-primary-contrast: #ffffff;--ion-color-primary-contrast-rgb: 255, 255, 255;--ion-color-primary-shade: #6321c4;--ion-color-primary-tint: #7e3ce2;--ion-color-secondary: #e2ccff;--ion-color-secondary-rgb: 226, 204, 255;--ion-color-secondary-contrast: #000000;--ion-color-secondary-contrast-rgb: 0, 0, 0;--ion-color-secondary-shade: #c7b4e0;--ion-color-secondary-tint: #e5d1ff;--ion-color-texti: #354c69;--ion-color-texti-rgb: 53, 76, 105;--ion-color-texti-contrast: #ffffff;--ion-color-texti-contrast-rgb: 255, 255, 255;--ion-color-texti-shade: #2f435c;--ion-color-texti-tint: #495e78;--ion-color-darki: #090f1b;--ion-color-darki-rgb: 9, 15, 27;--ion-color-darki-contrast: #ffffff;--ion-color-darki-contrast-rgb: 255, 255, 255;--ion-color-darki-shade: #080d18;--ion-color-darki-tint: #222732;--ion-color-medium: #9e9e9e;--ion-color-medium-rgb: 158, 158, 158;--ion-color-medium-contrast: #000000;--ion-color-medium-contrast-rgb: 0, 0, 0;--ion-color-medium-shade: #8b8b8b;--ion-color-medium-tint: #a8a8a8;--swiper-pagination-color: var(--ion-color-primary);--swiper-navigation-color: var(--ion-color-primary);--swiper-pagination-bullet-inactive-color: var(--ion-color-medium)}body.dark,html.ion-palette-dark,body[data-theme=dark]{--ion-color-texti: #8fc1ff;--ion-color-texti-rgb: 143, 193, 255;--ion-color-texti-contrast: #000000;--ion-color-texti-contrast-rgb: 0, 0, 0;--ion-color-texti-shade: #7eaae0;--ion-color-texti-tint: #9ac7ff;--ion-color-darki: #ffffff;--ion-color-darki-rgb: 255, 255, 255;--ion-color-darki-contrast: #000000;--ion-color-darki-contrast-rgb: 0, 0, 0;--ion-color-darki-shade: #e0e0e0;--ion-color-darki-tint: #ffffff;--ion-color-primary: #8f49f8;--ion-color-primary-rgb: 143, 73, 248;--ion-color-primary-contrast: #ffffff;--ion-color-primary-contrast-rgb: 255, 255, 255;--ion-color-primary-shade: #7e40da;--ion-color-primary-tint: #9a5bf9}.ion-color-texti{--ion-color-base: var(--ion-color-texti);--ion-color-base-rgb: var(--ion-color-texti-rgb);--ion-color-contrast: var(--ion-color-texti-contrast);--ion-color-contrast-rgb: var(--ion-color-texti-contrast-rgb);--ion-color-shade: var(--ion-color-texti-shade);--ion-color-tint: var(--ion-color-texti-tint)}.ion-color-darki{--ion-color-base: var(--ion-color-darki);--ion-color-base-rgb: var(--ion-color-darki-rgb);--ion-color-contrast: var(--ion-color-darki-contrast);--ion-color-contrast-rgb: var(--ion-color-darki-contrast-rgb);--ion-color-shade: var(--ion-color-darki-shade);--ion-color-tint: var(--ion-color-darki-tint)}:host{display:inline-block}.qr-code-container{display:inline-flex;flex-direction:column;align-items:center;gap:12px;padding:var(--padding);background:var(--container-bg);border-radius:var(--border-radius);box-shadow:var(--shadow);position:relative;transition:transform .2s ease,box-shadow .2s ease}.qr-code-container.with-border{border:1px solid var(--border-color)}.qr-code-container.loading .qr-image-wrapper{opacity:.5}.qr-code-container.scale-on-hover:hover{transform:scale(1.02)}.qr-code-container.pulse-on-hover:hover{animation:pulse 1.5s infinite}.qr-label{display:flex;align-items:center;gap:6px;color:var(--label-color);font-size:var(--label-size)}.qr-label ion-icon{font-size:1.1em}.qr-label .font-weight--normal{font-weight:400}.qr-label .font-weight--medium{font-weight:500}.qr-label .font-weight--semibold{font-weight:600}.qr-label .font-weight--bold{font-weight:700}.qr-label--top{margin-bottom:4px}.qr-label--bottom{margin-top:4px}.loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#ffffffb3;border-radius:var(--border-radius);z-index:1}.loading-overlay ion-spinner{width:32px;height:32px}.qr-image-wrapper{width:var(--size);height:var(--size);display:flex;align-items:center;justify-content:center;transition:opacity .2s}.qr-image{width:100%;height:100%;object-fit:contain;display:block;border-radius:var(--qr-border-radius)}.qr-actions{display:flex;align-items:center;justify-content:center;gap:4px}.qr-actions ion-button{--padding-start: 8px;--padding-end: 8px;--color: var(--ion-color-medium)}.qr-actions ion-button:hover{--color: var(--ion-color-primary)}.qr-actions ion-button ion-icon{font-size:1.25rem}.theme--minimal{background:transparent!important;padding:0!important;box-shadow:none!important;border:none!important}.theme--gradient-purple{background:linear-gradient(135deg,#667eea,#764ba2)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-purple .qr-image{border-radius:8px}.theme--gradient-purple .qr-label{color:#fff}.theme--gradient-purple .qr-actions ion-button{--color: rgba(255, 255, 255, .8)}.theme--gradient-purple .qr-actions ion-button:hover{--color: white}.theme--gradient-blue{background:linear-gradient(135deg,#4facfe,#00f2fe)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-blue .qr-image{border-radius:8px}.theme--gradient-blue .qr-label{color:#fff}.theme--gradient-blue .qr-actions ion-button{--color: rgba(255, 255, 255, .8)}.theme--gradient-blue .qr-actions ion-button:hover{--color: white}.theme--gradient-sunset{background:linear-gradient(135deg,#fa709a,#fee140)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-sunset .qr-image{border-radius:8px}.theme--gradient-sunset .qr-label{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.1)}.theme--gradient-sunset .qr-actions ion-button{--color: rgba(255, 255, 255, .9)}.theme--gradient-sunset .qr-actions ion-button:hover{--color: white}.theme--gradient-mint{background:linear-gradient(135deg,#11998e,#38ef7d)!important;padding:20px!important;border-radius:16px!important}.theme--gradient-mint .qr-image{border-radius:8px}.theme--gradient-mint .qr-label{color:#fff}.theme--gradient-mint .qr-actions ion-button{--color: rgba(255, 255, 255, .8)}.theme--gradient-mint .qr-actions ion-button:hover{--color: white}.theme--dark{background:linear-gradient(145deg,#1a1a2e,#16213e)!important;padding:20px!important;border-radius:16px!important;border:1px solid rgba(255,255,255,.1)!important}.theme--dark .qr-image{border-radius:8px;filter:invert(1)}.theme--dark .qr-label{color:#e0e0e0}.theme--dark .qr-actions ion-button{--color: rgba(255, 255, 255, .6)}.theme--dark .qr-actions ion-button:hover{--color: white}.theme--neon{background:#0a0a0a!important;padding:20px!important;border-radius:16px!important;border:2px solid var(--glow-color)!important;box-shadow:0 0 20px var(--glow-color),inset 0 0 20px #8b5cf61a!important}.theme--neon .qr-image{border-radius:8px;filter:drop-shadow(0 0 8px var(--glow-color))}.theme--neon .qr-label{color:var(--glow-color);text-shadow:0 0 10px var(--glow-color)}.theme--neon .qr-actions ion-button{--color: var(--glow-color)}.theme--neon .qr-actions ion-button:hover{--color: white}:host(.compact) .qr-actions{position:absolute;bottom:8px;left:50%;transform:translate(-50%);opacity:0;transition:opacity .2s;background-color:#ffffffe6;border-radius:8px;padding:4px}:host(.compact) .qr-code-container:hover .qr-actions{opacity:1}:host(.card) .qr-code-container{background-color:var(--ion-background-color, white);box-shadow:0 2px 8px #0000001a;padding:16px;border-radius:12px}@keyframes pulse{0%{box-shadow:var(--shadow),0 0 #6366f166}70%{box-shadow:var(--shadow),0 0 0 10px #6366f100}to{box-shadow:var(--shadow),0 0 #6366f100}}:host-context(body.dark) .loading-overlay,:host-context(.dark) .loading-overlay,:host-context(.ion-palette-dark) .loading-overlay,:host-context(html.ion-palette-dark) .loading-overlay,:host-context([data-theme=dark]) .loading-overlay{background-color:#000000b3}:host-context(body.dark).compact .qr-actions,:host-context(.dark).compact .qr-actions,:host-context(.ion-palette-dark).compact .qr-actions,:host-context(html.ion-palette-dark).compact .qr-actions,:host-context([data-theme=dark]).compact .qr-actions{background-color:#000000e6}:host-context(body.dark) .theme--default .qr-image,:host-context(.dark) .theme--default .qr-image,:host-context(.ion-palette-dark) .theme--default .qr-image,:host-context(html.ion-palette-dark) .theme--default .qr-image,:host-context([data-theme=dark]) .theme--default .qr-image{filter:invert(1)}\n"] }]
        }], propDecorators: { props: [{
                type: Input
            }], actionComplete: [{
                type: Output
            }], imageLoad: [{
                type: Output
            }], imageError: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 