"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("clsx"),h=require("lodash-unified");require("../../../config-provider/index.js");const B=require("../../style/statistics-card.js");require("../card/index.vue.js");require("../statistic/index.vue.js");const b=require("../../../config-provider/hooks/use-namespace.js"),_=require("../statistic/index.vue2.js"),S=require("../card/index.vue2.js"),g=e.defineComponent({name:"ApStatisticCard",__name:"index",props:{headStyle:{},bodyStyle:{},actionsStyle:{},headerBordered:{type:Boolean},title:{type:[Object,String,Number,Boolean,null,Array]},tooltip:{type:[Object,String,Number,Boolean,null,Array]},extra:{type:[Object,String,Number,Boolean,null,Array]},layout:{},type:{},direction:{},wrap:{type:Boolean},loading:{type:[Boolean,Object,String,Number,null,Array]},colSpan:{},colStyle:{},gutter:{},actions:{type:[Object,String,Number,Boolean,null,Array]},split:{},bordered:{type:Boolean},hoverable:{type:Boolean},ghost:{type:Boolean},collapsible:{type:Boolean},defaultCollapsed:{type:Boolean},collapsed:{type:Boolean,default:void 0},collapsibleIconRender:{},boxShadow:{type:Boolean},chart:{type:[Object,String,Number,Boolean,null,Array]},statistic:{},chartPlacement:{},footer:{type:[Object,String,Number,Boolean,null,Array]}},setup(d){const t=d,o=e.useSlots(),{b:a}=b.useNamespace("statistic-card"),p=B.default("statistic-card"),f=e.computed(()=>[a(),p.value]),m=e.computed(()=>{const r=a("chart");return u.clsx(`${r}`,[t.chartPlacement==="left"?`${r}-left`:void 0,t.chartPlacement==="right"?`${r}-right`:void 0].filter(Boolean))}),i=e.computed(()=>{const r=a("content");return u.clsx(`${r}`,[t.chartPlacement==="left"||t.chartPlacement==="right"?`${r}-horizontal`:void 0].filter(Boolean))}),y=e.computed(()=>a("footer")),n=e.computed(()=>t.statistic?e.createVNode(_.default,e.mergeProps({layout:"vertical"},t.statistic,{title:t.statistic?.title||o.statisticTitle?.(),prefix:t.statistic?.prefix||o.prefix?.(),suffix:t.statistic?.suffix||o.suffix?.(),icon:t.statistic?.icon||o.icon?.(),tip:t.statistic?.tip||o.tip?.(),description:t.statistic?.description||o.description?.()}),null):void 0),l=e.computed(()=>t.chart||o.chart?e.createVNode("div",{class:m.value},[t.chart||o.chart?.()]):void 0),c=e.computed(()=>l.value||n.value?t.chartPlacement==="left"?e.createVNode("div",{class:i.value},[l.value,n.value]):e.createVNode("div",{class:i.value},[n.value,l.value]):void 0),v=e.computed(()=>t.footer||o.footer?e.createVNode("div",{class:y.value},[t.footer||o.footer?.()]):void 0);return(r,C)=>(e.openBlock(),e.createBlock(S.default,e.mergeProps({class:f.value},{...t}),e.createSlots({default:e.withCtx(()=>[c.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:0})):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default"),c.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:1})):e.createCommentVNode("",!0)]),_:2},[e.renderList(e.unref(h.omit)(o,["chart","footer","description","default"]),(x,s)=>({name:s,fn:e.withCtx(()=>[e.renderSlot(r.$slots,s)])}))]),1040,["class"]))}});exports.default=g;
