import{a as i,_ as d}from"./check.js";import{o as e,c as o,a,d as t,t as p,_ as c}from"./index.js";const n={class:"product-load"},_={class:"product-load__progress product-progress"},f={key:0},m={key:1,src:i},u=a("div",{class:"product-load__icon"},[a("img",{src:d})],-1);function h(s,y,v,b,r,l){return e(),o("div",n,[a("div",_,[a("div",{class:"product-progress__value",style:t(l.progressStyles)},null,4),a("div",{class:"product-progress__caret",style:t({transition:"all 1s ease",bottom:`calc(${r.params.load}% - 1%)`,borderTopColor:l.progressColor})},null,4),a("div",{class:"product-progress__text",style:t({transition:"all 1s ease",bottom:`calc(${r.params.load}% - 4%)`})},[r.params.load<100?(e(),o("span",f,p(r.params.load)+"%",1)):(e(),o("img",m))],4)]),u])}const g={props:["openParams"],data(){return{params:{load:42}}},computed:{progressStyles(){let s={transition:"all 1.0s ease",height:`calc(${this.params.load}% + 2.3%)`,borderTopRightRadius:"2.085vh",backgroundColor:this.progressColor};return this.params.load<=100&&this.params.load>95&&(s.borderTopRightRadius="1.245vh"),s},progressColor(){return this.params.load<=10?"#ff2700":this.params.load<=20?"#ff4000":this.params.load<=30?"#ff5a00":this.params.load<=40?"#ff7400":this.params.load<=50?"#ff8100":this.params.load<=60?"#ff8d00":this.params.load<=70?"#ff9a00":this.params.load<=80?"#ffa700":this.params.load<=90?"#ffb400":this.params.load<100?"#ffcc00":"#37c81f"}},created(){this.$data.noAdaptation=!0,this.openParams&&(this.params.load=this.openParams)},methods:{setValues(s){typeof s=="string"&&(s=JSON.parse(s)),this.params.load=s[0]}}},C=c(g,[["render",h]]);export{C as default};
