import {Component, Input, input, output} from '@angular/core'; import { NzButtonModule } from 'ng-zorro-antd/button'; import { NzModalModule } from 'ng-zorro-antd/modal'; import {NzIconDirective} from "ng-zorro-antd/icon"; @Component({ selector: 'app-modal-nav', imports: [NzButtonModule, NzModalModule, NzIconDirective], templateUrl: 'modal-nav.html', styleUrls: ['./modal-nav.css'], }) export class ModalNav { nameIcon = input.required() name = input.required() ok = output(); cancel = output(); isVisible = false; isOkLoading = false; showModal(): void { this.isVisible = true; } handleOk(): void { this.isOkLoading = true; setTimeout(() => { this.ok.emit(); this.isOkLoading = false; }, 1000); } handleCancel(): void { this.isVisible = false; this.cancel.emit(); } }