ng-implementation/my-workspace/projects/sae-lib/modal/confirm/confirm.ts

30 lines
736 B
TypeScript
Raw Normal View History

2025-09-26 12:42:25 +02:00
import {Component, EventEmitter, Input, Output} from '@angular/core';
2025-09-26 12:30:20 +02:00
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;
2025-09-26 12:42:25 +02:00
@Output() onConfirmation: EventEmitter<any> = new EventEmitter();
@Output() onRejection: EventEmitter<any> = new EventEmitter();
2025-09-26 12:30:20 +02:00
confirm() {
2025-09-26 12:42:25 +02:00
console.log('confirm button clicked')
this.onConfirmation.emit('confirmed');
2025-09-26 12:30:20 +02:00
}
reject() {
2025-09-26 12:42:25 +02:00
console.log('reject button clicked')
this.onRejection.emit('rejected');
2025-09-26 12:30:20 +02:00
}
}