import { Component, EventEmitter, Injector, ViewChild, Output,Input } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { ModalDirective } from 'ngx-bootstrap';
import { ControllerRouteDetailServiceProxy} from '@shared/service-proxies/service-proxies';
import { PrimengTableHelper } from 'shared/helpers/PrimengTableHelper';
import { finalize } from 'rxjs/operators';
import * as jquery from 'jquery';
import * as moment from 'moment';
// import * as DualListbox from 'dual-listbox';
@Component({
    templateUrl: './clinic-notes.component.html',
    selector: 'clinicNotes'
})
export class ClinicNotes extends AppComponentBase {

   @ViewChild('clinicNotesModal', {static: false}) modal: ModalDirective;
   @Output() modalSave: EventEmitter<any> = new EventEmitter<any>();


    active = false;
    saving = false;
   
    constructor(
        injector: Injector,
        private _controllerRouteDetails: ControllerRouteDetailServiceProxy,
    ) {
        super(injector);
    }

    ngOnInit(){
    }

    show(clinicId ?:number,orderId ?:number):void {

        this._controllerRouteDetails.getClinicNotes(clinicId,orderId).subscribe(result=>{
            console.log(result);
        });

        this.active = true;
        this.modal.show();
        
    }

    onShown(): void {
       
    }


    close(): void {
        this.active = false;
        this.modal.hide();
    }
}
