import{d as u,b as d,o as n,c as t,a as l,A as r,f as y,r as g,q as f,I as v,_ as T}from"./index-DO6SfH87.js";const k=["innerHTML"],m=["innerHTML"],b={key:1,class:"value-wrapper"},h=["innerHTML"],p=["innerHTML"],H={key:2,class:"trend-indicator"},L=["innerHTML"],M=["src"],S=["innerHTML"],B=["innerHTML"],C=u({__name:"index",props:{title:{type:String,required:!0},value:{type:String,default:""},unit:{type:String,default:""},trend:{type:Object,default:null},icon:{type:String,default:""},description:{type:String,default:""},percentage:{type:String,default:""},cardType:{type:String,default:"default"},showBorder:{type:Boolean,default:!0},backgroundColor:{type:String,default:"rgba(254, 254, 254, 1)"},padding:{type:String,default:"8px"}},setup(e){const a=e,c=d(()=>a.cardType==="type2"?"rgba(64, 158, 255, 0.08)":a.backgroundColor),i=d(()=>a.cardType==="type2"?!1:a.showBorder);return(o,x)=>{const s=v;return n(),t("div",{class:"data-card",style:f({backgroundColor:c.value,border:i.value?"1px solid rgba(230, 238, 248, 1)":"none",padding:e.padding})},[l("span",{class:"card-title",innerHTML:e.title},null,8,k),e.percentage?(n(),t("span",{key:0,class:"card-value",innerHTML:e.percentage},null,8,m)):r("",!0),e.value||e.icon?(n(),t("div",b,[e.value?(n(),t("span",{key:0,class:"value-number",innerHTML:e.value},null,8,h)):r("",!0),e.unit?(n(),t("span",{key:1,class:"value-unit",innerHTML:e.unit},null,8,p)):r("",!0),e.icon?(n(),y(s,{key:2,name:"arrow",class:"value-icon"})):r("",!0)])):r("",!0),e.trend?(n(),t("div",H,[e.trend.label?(n(),t("span",{key:0,class:"trend-label",innerHTML:e.trend.label},null,8,L)):r("",!0),e.trend.icon?(n(),t("img",{key:1,class:"trend-icon",referrerpolicy:"no-referrer",src:e.trend.icon},null,8,M)):r("",!0),l("span",{class:"trend-value",innerHTML:e.trend.value},null,8,S)])):r("",!0),e.description?(n(),t("span",{key:3,class:"card-desc",innerHTML:e.description},null,8,B)):r("",!0),l("div",null,[g(o.$slots,"extra",{},void 0)])],4)}}}),I=T(C,[["__scopeId","data-v-0d1b97b5"]]);export{I as D};
