import { AfterViewInit, ElementRef } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { SidebarPlusI18nService } from '../i18n'; /** * Small yes/no modal, HTML/Bootstrap rather than a native OS dialog — * `platform.showMessageBox()` is a system confirm box, which is exactly what * every confirmation in this plugin is meant to avoid (piège #42). */ export declare class ConfirmModalComponent implements AfterViewInit { private modalInstance; private i18n; message: string; /** * Set from the constructor rather than a field initializer: every real * caller overwrites this right after `ngbModal.open()`, but the default * still has to go through the same translation table as everything else, * which needs `i18n` injected first. */ confirmLabel: string; danger: boolean; /** Which button `Entrée` activates. The caller decides — this component has no opinion on how destructive its own confirmation is — and the fallback is the harmless answer. */ defaultButton: 'confirm' | 'cancel'; confirmButton: ElementRef; cancelButton: ElementRef; constructor(modalInstance: NgbActiveModal, i18n: SidebarPlusI18nService); /** * Puts the focus where `defaultButton` says, so `Entrée` activates it — * with 'confirm', `Suppr` then `Entrée` is one gesture (user request, * 2026-07-30, made configurable right after). * * Deferred by a `setTimeout`: NgbModal fades its window in, and focusing * an element that is still animating in silently does nothing. `Échap` * cancels either way, through NgbModal's own dismiss. */ ngAfterViewInit(): void; confirm(): void; cancel(): void; }