"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("./types.js"),o=require("element-plus");require("../../confirm-button/index.js");require("../../count-down-button/index.js");const k=require("../../ellipsis/index.js");require("../../rich-text-editor/index.js");require("../../form-fileds/index.js");require("../../pro-form/index.js");require("../../pro-table/index.js");require("../../pro-descriptions/index.js");require("../index.js");require("../../page/index.js");require("../../guide/index.js");const f=require("../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.4.21/node_modules/@element-plus/icons-vue/dist/index.js"),V=e.defineComponent({name:"WetProCard",__name:"index",props:C.wetProCardProps,emits:["update:collapse","update:tabKey"],setup(m,{emit:b}){const u=e.useSlots(),r=o.useNamespace("pro-card"),t=m,i=e.computed(()=>t.ghost||t.isLayout),h=e.computed(()=>{var l;return t.span&&typeof t.span=="number"?t.span:(l=t.colSpan)==null?void 0:l.span}),n=e.computed(()=>t.span&&typeof t.span=="string"?t.span:""),v=e.computed(()=>!!(t.title||t.tooltip||u.extra||u.header||t.collapsible)),c=b,s=e.shallowRef(!1);e.watch(()=>t.collapse,l=>{l!==void 0&&(s.value=l)},{deep:!0,immediate:!0});const y=()=>{t.collapsible&&(s.value=!s.value,c("update:collapse",s.value))},d=e.shallowRef();e.watch(()=>t.tabKey,l=>{l!==void 0&&(d.value=l)},{deep:!0,immediate:!0});const w=l=>{c("update:tabKey",l)},p=e.computed(()=>t.tabList&&t.tabList.length!==0);return(l,g)=>(e.openBlock(),e.createBlock(e.unref(o.ElCol),e.mergeProps(t.colSpan,{span:h.value,class:[e.unref(r).b(),e.unref(r).is("layout",t.isLayout),e.unref(r).is("split",!!t.split),e.unref(r).is("tab",p.value)],style:{"--wet-card-w":n.value,"--wet-card-pad":i.value?0:"var(--wet-card-padding,15px)","--wet-card-bg-c":i.value?"transparent":"var(--wet-card-bg-color,#fff)",maxWidth:n.value,minWidth:n.value}}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).e("card-inner"),e.unref(r).is("bordered",t.bordered&&!t.isLayout),t.shadow&&!t.isLayout&&`is-${t.shadow}`])},[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(r).e("header"),e.unref(r).is("border-bottom",t.headerBordered),e.unref(r).is("collapsible",t.collapsible),e.unref(r).is("collapse",s.value)]),onClick:y},[e.renderSlot(l.$slots,"header",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(r).em("header","title"))},[e.createVNode(e.unref(k.TextEllipsis),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.tooltip?(e.openBlock(),e.createBlock(e.unref(o.ElTooltip),{key:0,content:t.tooltip,placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.InfoFilled))]),_:1})]),_:1},8,["content"])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).em("header","extra")])},[e.renderSlot(l.$slots,"extra"),t.collapsible?(e.openBlock(),e.createBlock(e.unref(o.ElIcon),{key:0,class:e.normalizeClass([e.unref(r).em("header","arrow-icon")])},{default:e.withCtx(()=>[e.createVNode(e.unref(f.ArrowRight))]),_:1},8,["class"])):e.createCommentVNode("",!0)],2)])],2)):e.createCommentVNode("",!0),e.withDirectives(e.createVNode(e.unref(o.ElRow),{gutter:t.gutter,class:e.normalizeClass([e.unref(r).e("body"),e.unref(r).is(`split-${t.split}`,!!t.split)])},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default"),p.value?(e.openBlock(),e.createBlock(e.unref(o.ElTabs),e.mergeProps({key:0},t.tabProps,{style:{width:"100%","margin-top":"-10px"},modelValue:d.value,"onUpdate:modelValue":w}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabList,a=>(e.openBlock(),e.createBlock(e.unref(o.ElTabPane),{name:a.key,label:a.tab,closable:a.closable,disabled:a.disabled,key:a.key},{default:e.withCtx(()=>[a.children?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.children),{key:0})):e.createCommentVNode("",!0),e.renderSlot(l.$slots,a.key)]),_:2},1032,["name","label","closable","disabled"]))),128))]),_:3},16,["modelValue"])):e.createCommentVNode("",!0)]),_:3},8,["gutter","class"]),[[e.vShow,!s.value]]),e.createElementVNode("div",{class:e.normalizeClass([e.unref(r).e("footer")])},[e.renderSlot(l.$slots,"footer")],2)],2)]),_:3},16,["span","class","style"]))}});exports.default=V;
