"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("lodash-unified");require("../../config-provider/index.js");require("../ap-title/ApTitle.vue.js");const u=require("./style/index.js"),d=require("../../config-provider/hooks/use-namespace.js"),f=require("../ap-title/ApTitle.vue2.js"),m={key:2},x={key:2},k=e.defineComponent({__name:"ApCard",props:{titleProps:{},padding:{}},setup(s){const t=s,o=e.useSlots(),{b:i}=d.useNamespace("ap-card"),l=u.default("ap-card"),n=e.computed(()=>c.omit(t?.titleProps||{},["prefix","suffix"])),p=e.computed(()=>Object.keys(t?.titleProps||{})?.length),a=e.computed(()=>t.padding??"var(--ap-card-padding, 12px 16px)");return(r,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(i)(),e.unref(l)]),style:e.normalizeStyle({padding:a.value})},[p.value||o?.titlePrefix||o?.titleSuffix?(e.openBlock(),e.createBlock(f.default,e.mergeProps({key:0,class:[`${e.unref(i)()}-title`]},{...n.value}),e.createSlots({_:2},[o?.titleSuffix||t?.titleProps?.suffix?{name:"suffix",fn:e.withCtx(()=>[o?.titleSuffix?e.renderSlot(r.$slots,"titleSuffix",{key:0}):e.isVNode(t?.titleProps?.suffix)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t?.titleProps?.suffix),{key:1})):(e.openBlock(),e.createElementBlock("div",m,e.toDisplayString(t?.titleProps?.suffix),1))]),key:"0"}:void 0,o?.titlePrefix||t?.titleProps?.prefix?{name:"prefix",fn:e.withCtx(()=>[o?.titlePrefix?e.renderSlot(r.$slots,"titlePrefix",{key:0}):e.createCommentVNode("",!0),e.isVNode(t?.titleProps?.prefix)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t?.titleProps?.prefix),{key:1})):(e.openBlock(),e.createElementBlock("div",x,e.toDisplayString(t?.titleProps?.prefix),1))]),key:"1"}:void 0]),1040,["class"])):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"default")],6))}});exports.default=k;
