import{b,c as v}from"./chunk-AI2T33KF.js";import{a as u}from"./chunk-3CODJNWE.js";import{Ba as c,Bc as r,Cc as f,Dc as p,Jc as h,Rb as d,bc as a,cc as n,dc as m,sb as i}from"./chunk-IYD54RT7.js";var D=(()=>{let t=class t{constructor(){this.title="",this.labels=[],this.data=[],this.colors=[],this.pieChartData={datasets:[]},this.pieChartOptions={responsive:!0,plugins:{legend:{display:!1}}}}ngOnInit(){this.pieChartData={labels:this.labels,datasets:[{data:this.data,backgroundColor:this.colors}]}}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=c({type:t,selectors:[["osee-pie-chart"]],inputs:{title:"title",labels:"labels",data:"data",colors:"colors"},standalone:!0,features:[h],decls:5,vars:4,consts:[[1,"tw-flex","tw-flex-col","tw-items-center"],[1,"tw-text-lg","tw-font-bold"],[1,"tw-h-52","tw-w-52"],["baseChart","",3,"data","type","options"]],template:function(s,e){s&1&&(a(0,"div",0)(1,"mat-label",1),r(2),n(),a(3,"div",2),m(4,"canvas",3),n()()),s&2&&(i(2),f(e.title),i(2),d("data",e.pieChartData)("type","pie")("options",e.pieChartOptions))},dependencies:[v,b,u],encapsulation:2});let o=t;return o})();var S={name:"",scriptsPass:0,scriptsFail:0,scriptsAbort:0,scriptsDispo:0,testPointsPass:0,testPointsFail:0,scriptsRan:0,scriptsNotRan:0,scriptsExecutionDate:new Date};var E=(()=>{let t=class t{constructor(){this.stats=S,this.labels=["Pass","Fail","Abort","Dispo'd"],this.colors=["green","red","orange","yellow"],this.data=[],this.title=""}ngOnInit(){let l=this.stats.scriptsPass+this.stats.scriptsFail+this.stats.scriptsAbort+this.stats.scriptsDispo,s=l===0?0:Math.floor(this.stats.scriptsPass/l*100);this.title=this.stats.name+" - "+s+"%",this.data=[this.stats.scriptsPass,this.stats.scriptsFail,this.stats.scriptsAbort,this.stats.scriptsDispo]}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=c({type:t,selectors:[["osee-scripts-pass-fail-chart"]],inputs:{stats:"stats"},standalone:!0,features:[h],decls:10,vars:8,consts:[[3,"title","labels","data","colors"],[1,"tw-pl-4","tw-pt-2","tw-font-bold"]],template:function(s,e){s&1&&(m(0,"osee-pie-chart",0),a(1,"ul",1)(2,"li"),r(3),n(),a(4,"li"),r(5),n(),a(6,"li"),r(7),n(),a(8,"li"),r(9),n()()),s&2&&(d("title",e.title)("labels",e.labels)("data",e.data)("colors",e.colors),i(3),p("Pass: ",e.stats.scriptsPass,""),i(2),p("Fail: ",e.stats.scriptsFail,""),i(2),p("Abort: ",e.stats.scriptsAbort,""),i(2),p("Dispo'd: ",e.stats.scriptsDispo,""))},dependencies:[D],encapsulation:2});let o=t;return o})();export{D as a,S as b,E as c};
