import{g as h,q as v}from"./chunk-FVKBUVY2.js";import{c as o,d as R}from"./chunk-2AH3OLVO.js";import{$b as a,Bd as m,Kb as l,Qb as p,Sd as I,hc as s,ic as d,jc as r,kc as u,lc as f,nd as g,sc as c,xb as n}from"./chunk-PGS4AHIT.js";R();g();I();function b(e,P){if(e&1&&(u(0),r(1,"paw-input-field",2),f()),e&2){let t=c();n(),a("field",t.noteInputField)("model",t.noteModel)}}var A=(()=>{class e{constructor(){this.model=null,this.fieldId="note",this.dialogTitle="Opomba",this.noteActions={cancel:{id:"note-popup-cancel",label:"Cancel",type:"paw-icon-btn",onSelected:()=>{this.dialogRef.close()}},submit:{id:"nonte-popup-save",label:"Save",type:"mat-flat-button",color:"primary",icon:"fa fa-save",onSelected:()=>this.save()}},this.dialogActions=[this.noteActions.cancel,this.noteActions.submit],this.noteModel={note:""},this.noteInputField={id:"note",component:v}}ngOnInit(){this.noteInputField.feature=this.disabledFeature,this.noteActions.cancel.hideFeature=this.disabledFeature,this.noteActions.submit.hideFeature=this.disabledFeature,this.setValuePropertyRef()}save(){return this.valuePropertyRef.property[this.fieldId]=this.noteModel.note,this.dialogRef.close(),this.onSave?.()}setValuePropertyRef(){this.valuePropertyRef=o.getValuePropertyRef(this.model,this.fieldId),o.isSet(this.valuePropertyRef)&&(this.noteModel.note=o.isSet(this.valuePropertyRef?.valueId)?this.valuePropertyRef.property[this.valuePropertyRef.valueId]:this.valuePropertyRef.property[this.fieldId])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=l({type:e,selectors:[["paw-note-popup"]],inputs:{model:"model",fieldId:"fieldId",dialogRef:"dialogRef",disabledFeature:"disabledFeature",onSave:"onSave"},standalone:!1,decls:2,vars:1,consts:[[1,"paw-padding-left-m","paw-padding-right-m","paw-padding-top-s"],[4,"ngIf"],[1,"w-full","h-full",3,"field","model"]],template:function(i,y){i&1&&(s(0,"div",0),p(1,b,2,2,"ng-container",1),d()),i&2&&(n(),a("ngIf",y.model))},dependencies:[m,h],encapsulation:2})}}return e})();export{A as a};
