"use strict";(self.webpackChunkWebBehandish=self.webpackChunkWebBehandish||[]).push([[260],{16260:(R,u,o)=>{o.d(u,{R:()=>M});var m=o(21626),_=o(45312),p=o(29240),l=o(842),e=o(4020),c=o(89417),d=o(21223),h=o(18498),C=o(97302),T=o(49898),I=o(69376),P=o(75496);const v=["picker"],E=n=>({ConditionPickerStrategy:n}),s=()=>({standalone:!0});let M=(()=>{class n extends p.n{constructor(a,r,t,i){super(),this.fb=a,this.kernelService=r,this.activedRoute=t,this.dynamicComponentService=i,this.ReportName="RptPrintTree",this.ReportTitle="\u0686\u0627\u067e \u062f\u0631\u062e\u062a ",this.ReportUrl=_.c.apiUrl+"API/KernelReport",this.Tabular=0,this.Sort=0,this.BizForm=this.fb.group({Names:[{value:"",disabled:!1}],tabular:[this.Tabular],Sort:[this.Sort],Active:[{value:!0,disabled:!1}],InActive:[{value:!0,disabled:!1}],IsTreeStyle:[{value:!0,disabled:!1}]}),this.Title=""}get ReportID(){return`RptPrintTree${this.TreeType}`}get IsOrderByCode(){return 0==(this.BizForm?.controls?.tabular?.value??0)}ngOnInit(){this.TreeType=this.ShowResultInCurrentWindow?this.activedRoute.snapshot?.queryParams?.TreeType??"":this.ReportExtraData.TreeType,this.ReportExtraData=this.ShowResultInCurrentWindow?window[`ReportExtraData${this.ReportID}`]:this.ReportExtraData;var a=this.dynamicComponentService?.ConditionPickers?.get(this.TreeType);this.pickerType=a?.ComponentType,this.Title+=a?.Title??"",this.ReportTitle=`${this.ReportTitle?.trimEnd()??""} ${this.Title}`,this.CndStrategy=a.Strategy,this.HttpParams=(new m.Nl).set("ShowIdle",!0)}GetReportParams(){return(new Map).set("ID","0").set("Active",`${this.BizForm.controls?.Active?.value??0}`).set("InActive",`${this.BizForm.controls?.InActive?.value??0}`).set("IsTreeStyle",`${this.BizForm.controls?.IsTreeStyle?.value??0}`).set("OrderByCode",`${this.IsOrderByCode}`).set("OrderByName",`${!this.IsOrderByCode}`).set("TreePath",`${this.TreeType}`)}GetProperties(){var a=this.ReportExtraData.Columns;return{IDs:this.picker?.NgModel?.map(t=>t.ID)?.join(",")??"",ConditionTitle:this.BizForm?.controls?.Names?.value??"",Columns:a?.map(t=>t?.datafield+"/"+t?.text)?.join(",")??""}}static{this.\u0275fac=function(r){return new(r||n)(e.rXU(c.ok),e.rXU(d.h3),e.rXU(h.nX),e.rXU(C._i))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-rpt-print-tree"]],viewQuery:function(r,t){if(1&r&&e.GBs(v,5,l.a),2&r){let i;e.mGM(i=e.lsd())&&(t.picker=i.first)}},standalone:!1,features:[e.Vt3],decls:10,vars:42,consts:[["picker",""],[3,"ReportStrategy"],[1,"col-xs-12","col-sm-6","col-lg-6","from-group",3,"MultiSelect","ConditionPickerComponent","DataPropertyName","SelectionMode","FormControl","Title","ExtraData","HttpParams","SelectedItemsOptimization","ShowModal","ModalHeader","PlaceHolder","ID"],[1,"row"],[1,"col-xs-12","col-sm-4","col-lg-4",3,"Lable","Value","NgModel","FormControl"],[1,"col-xs-12","col-sm-3","col-lg-3",3,"Lable","Value","NgModel","FormControl"],[1,"col-xs-12","col-sm-6","col-lg-4","mt-1","from-group",3,"ID","Label","FormControl","NgModelOptions","NgModel"]],template:function(r,t){if(1&r&&(e.j41(0,"behBaseReport",1),e.nrm(1,"behObjectPicker",2,0),e.j41(3,"div",3),e.nrm(4,"behRadioButton",4)(5,"behRadioButton",5),e.k0s(),e.j41(6,"div",3),e.nrm(7,"behCheckbox",6)(8,"behCheckbox",6)(9,"behCheckbox",6),e.k0s()()),2&r){let i;e.Y8G("ReportStrategy",t),e.R7$(),e.Y8G("MultiSelect",!0)("ConditionPickerComponent",t.pickerType)("DataPropertyName","Name")("SelectionMode","Leaf")("FormControl",t.BizForm.get("Names"))("Title",null!==(i=t.BizForm.get("Names").value)&&void 0!==i?i:"\u0627\u0646\u062a\u062e\u0627\u0628 ")("ExtraData",e.eq3(37,E,t.CndStrategy))("HttpParams",t.HttpParams)("SelectedItemsOptimization",!0)("ShowModal",!0)("ModalHeader","\u0627\u0646\u062a\u062e\u0627\u0628 "+t.Title)("PlaceHolder",t.Title)("ID","NamesPicker"),e.R7$(3),e.Y8G("Lable","\u0628\u0631\u062d\u0633\u0628 \u06a9\u062f")("Value",0)("NgModel",t.Sort)("FormControl",t.BizForm.get("Sort")),e.R7$(),e.Y8G("Lable","\u0628\u0631\u062d\u0633\u0628 \u0639\u0646\u0648\u0627\u0646")("Value",1)("NgModel",t.Sort)("FormControl",t.BizForm.get("Sort")),e.R7$(2),e.Y8G("ID","cbxIsTreeStyle")("Label","\u0633\u0627\u062e\u062a\u0627\u0631 \u062f\u0631\u062e\u062a\u06cc")("FormControl",t.BizForm.get("IsTreeStyle"))("NgModelOptions",e.lJ4(39,s))("NgModel",!0),e.R7$(),e.Y8G("ID","cbxActive")("Label","\u0622\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0641\u0639\u0627\u0644")("FormControl",t.BizForm.get("Active"))("NgModelOptions",e.lJ4(40,s))("NgModel",!0),e.R7$(),e.Y8G("ID","cbxInActive")("Label","\u0622\u06cc\u062a\u0645 \u0647\u0627\u06cc \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644")("FormControl",t.BizForm.get("InActive"))("NgModelOptions",e.lJ4(41,s))("NgModel",!0)}},dependencies:[T.S,I.y,P._,l.a],encapsulation:2})}}return n})()}}]);