29 lines
736 B
TypeScript
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');
|
|
}
|
|
}
|