ng-implementation/my-workspace/projects/sae-lib/modal/confirm/confirm.ts
2025-09-26 12:42:25 +02:00

29 lines
736 B
TypeScript

import {Component, EventEmitter, Input, Output} from '@angular/core';
import {MainButton} from '../../buttons/main-button/main-button';
import {AlertBox} from '../../alert-box/alert-box';
@Component({
selector: 'sae-confirm',
imports: [
MainButton,
AlertBox
],
templateUrl: './confirm.html',
styleUrl: './confirm.scss'
})
export class Confirm {
@Input() showWhen: any = false;
@Output() onConfirmation: EventEmitter<any> = new EventEmitter();
@Output() onRejection: EventEmitter<any> = new EventEmitter();
confirm() {
console.log('confirm button clicked')
this.onConfirmation.emit('confirmed');
}
reject() {
console.log('reject button clicked')
this.onRejection.emit('rejected');
}
}