"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("@ant-design/icons-vue"),l=require("@aplus-frontend/antdv"),i=require("clsx"),$=require("lodash-unified");require("../../../config-provider/index.js");const M=require("../../style/statistic.js"),q=require("../../../config-provider/hooks/use-namespace.js"),_=e.defineComponent({name:"ApProCardStatistic",__name:"index",props:{prefixCls:{},decimalSeparator:{},groupSeparator:{},format:{},value:{},valueStyle:{},valueRender:{},formatter:{type:[Boolean,String,Function],default:void 0},precision:{},prefix:{type:[Object,String,Number,Boolean,null,Array],default:void 0},suffix:{type:[Object,String,Number,Boolean,null,Array],default:void 0},title:{type:[Object,String,Number,Boolean,null,Array],default:void 0},loading:{type:Boolean},description:{type:[Object,String,Number,Boolean,null,Array],default:void 0},tip:{type:[Object,String,Number,Boolean,null,Array],default:void 0},status:{default:void 0},icon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},layout:{default:"inline"},trend:{default:void 0},size:{default:"default"}},setup(p){const n=e.useSlots(),t=p,{b:r}=q.useNamespace("pro-card-statistic"),f=M.default("pro-card-statistic"),m=e.computed(()=>{const o=r();return i.clsx(`${o}`,[t.size?`${o}-size-${t.size}`:void 0,f.value].filter(Boolean))}),v=e.computed(()=>r("tip")),y=e.computed(()=>{const o=r();return i.clsx(`${o}-trend-icon`,[t.trend?`${o}-trend-icon-${t.trend}`:void 0].filter(Boolean))}),B=e.computed(()=>r("status")),C=e.computed(()=>r("icon")),x=e.computed(()=>r("wrapper")),k=e.computed(()=>r("content")),N=e.computed(()=>{const o=r();return i.clsx(`${o}-layout`,[t.layout?`${o}-layout-${t.layout}`:void 0,t.trend?`${o}-trend-${t.trend}`:void 0].filter(Boolean))}),g=e.computed(()=>r("description")),c=e.computed(()=>t.tip||n.tip?e.createVNode(l.Tooltip,{title:t.tip??n.tip?.()},{default:()=>[e.createVNode(V.QuestionCircleOutlined,{class:v.value},null)]}):void 0),a=e.computed(()=>t.trend?e.createVNode("div",{class:y.value},null):void 0),D=e.computed(()=>t.status?e.createVNode(l.Badge,{class:B.value,status:t.status},null):void 0),O=e.computed(()=>t.icon||n.icon?e.createVNode("div",{class:C.value},[t.icon??n.icon?.()]):void 0),u=e.computed(()=>t.title||n.title?e.createVNode(e.Fragment,null,[t.title||n.title?.()]):void 0),s=e.computed(()=>t.prefix||n.prefix?e.createVNode(e.Fragment,null,[t.prefix||n.prefix?.()]):void 0),d=e.computed(()=>t.suffix||n.suffix?e.createVNode(e.Fragment,null,[t.suffix||n.suffix?.()]):void 0),S=e.computed(()=>t.description||n.description?e.createVNode("div",{class:g.value},[t.description||n.description?.()]):void 0);return(o,h)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({...o.$attrs},{class:m.value}),[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.value))),e.createElementVNode("div",{class:e.normalizeClass(x.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.value))),e.createElementVNode("div",{class:e.normalizeClass(k.value)},[e.createVNode(e.unref(l.Statistic),e.mergeProps({class:N.value},{...e.unref($.omit)(t,["title","prefix"]),formatter:t.formatter??(({value:b})=>b??"--")}),e.createSlots({_:2},[u.value||c.value?{name:"title",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value)))]),key:"0"}:void 0,s.value?{name:"prefix",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),key:"1"}:void 0,a.value||d.value?{name:"suffix",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value))),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value)))]),key:"2"}:void 0]),1040,["class"]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.value)))],2)],2)],16))}});exports.default=_;
