import{u as k,c as p,j as i,e as r,h as d,f as o,K as f,t as l,az as b,w as c,g as a,A as m,H as g,R as T,l as h,ak as y,Q as w}from"./index-OSKNspXo.js";import{D as z}from"./deenovaPictoFractionComponent-CrqZsTZY.js";import{r as _}from"./risky-CfsdRIvW.js";const $={class:"row h-100"},N={class:"row"},x={class:"q-pb-xs",style:{height:"2rem"}},q={key:0,style:{"font-size":"medium"}},C={key:1,style:{"font-size":"medium"}},S={key:2,style:{"font-size":"medium"}},Q={key:3,style:{"font-size":"medium"}},H={__name:"levelGaugeComponent",props:{value:{type:Number},warningThreshold:{type:Number},alertThreshold:{type:Number},positiveThreshold:{type:Number}},setup(e){const{t:n}=k({useScope:"parent"}),t=e,u=p(()=>{let s;return t.value<t.alertThreshold?s="negative":t.value<t.warningThreshold?s="warning":s="positive",s}),v=p(()=>{let s;return t.value<=0?s=0:t.value<t.alertThreshold?s=25:t.value<t.warningThreshold?s=50:t.value<t.positiveThreshold?s=75:s=100,s});return(s,I)=>(r(),i("div",$,[d("div",N,[d("div",{class:f([`text-${u.value}`,"q-pr-sm h-100"]),style:{"font-size":"large","font-weight":"bold"}},l(e.value),3),d("div",x,[d("div",{class:f(["column justify-end rounded h-100",`bg-${u.value}-opacity`]),style:{width:"0.5rem","border-radius":"1rem"}},[d("div",{class:f(["w-100",`bg-${u.value}`]),style:b([{height:`${v.value}%`},{"border-radius":"1rem"}])},null,6)],2)]),o(m,null,{default:c(()=>[e.alertThreshold>0&&e.value<e.alertThreshold?(r(),i("div",q,l(a(n)("ui.threshold.alert.tooltip",[e.alertThreshold])),1)):e.positiveThreshold>0&&e.value<e.warningThreshold?(r(),i("div",C,l(a(n)("ui.threshold.warning.tooltip",[e.alertThreshold])),1)):e.positiveThreshold>0&&e.alertThreshold>0?(r(),i("div",S,l(a(n)("ui.threshold.positive.tooltip")),1)):(r(),i("div",Q,l(a(n)("ui.threshold.empty.tooltip")),1))]),_:1})])]))}},V={class:"row items-center"},j={class:"text-bold q-pr-sm"},B={key:0,class:"q-pr-sm cursor-pointer"},D=["src"],A={key:1,class:"q-pr-sm cursor-pointer"},K={__name:"productComponent",props:{item:{type:Object}},setup(e){const n=e,{t}=k(),u=p(()=>`${n.item.stock.reference} - ${n.item.stock.label}`);return(v,s)=>(r(),i("div",V,[d("div",j,[T(v.$slots,"label",{},()=>[h(l(u.value),1)])]),e.item.stock.risky?(r(),i("div",B,[o(y,{size:"1.5rem"},{default:c(()=>[d("img",{src:a(_),alt:""},null,8,D),o(m,null,{default:c(()=>[h(l(a(t)("ui.medicine.risk.tooltip")),1)]),_:1})]),_:1})])):g("",!0),e.item.stock.narcotic?(r(),i("div",A,[o(y,{size:"1.5rem",style:{"background-color":"#f90101"}},{default:c(()=>[o(w,{name:"vaccines",size:"1.25rem",color:"white"}),o(m,null,{default:c(()=>[h(l(a(t)("ui.medicine.narcotic.tooltip")),1)]),_:1})]),_:1})])):g("",!0),o(y,{class:"q-mr-md bg-white cursor-pointer",size:"1.5rem"},{default:c(()=>[o(z,{fraction:e.item.stock.fraction,"size-label":"smaller"},null,8,["fraction"]),o(m,null,{default:c(()=>[h(l(a(t)("ui.fraction.tooltip",[e.item.stock.fraction.toString()])),1)]),_:1})]),_:1})]))}};export{K as _,H as a};
//# sourceMappingURL=productComponent-ClIA4iIg.js.map
