"use strict";const t=require("vue"),f=require("../Shared/base-iCmnU-fv.js"),g=require("../Shared/_plugin-vue_export-helper-BHFhmbuH.js"),v=t.defineComponent({name:"ClTransitionSlideupdown",__name:"SlideUpDown",setup(r){const o=t.reactive({oldPaddingTop:"",oldPaddingBottom:"",oldOverflow:""}),a=e=>{o.oldPaddingBottom=e.style.paddingBottom,o.oldPaddingTop=e.style.paddingTop,e.style.paddingTop="0",e.style.paddingBottom="0",e.style.maxHeight="0"},c=(e,i)=>{o.oldOverflow=e.style.overflow;const s=e.scrollHeight;s>0?e.style.maxHeight=s+"px":e.style.maxHeight="0",e.style.paddingTop=o.oldPaddingTop,e.style.paddingBottom=o.oldPaddingBottom,e.style.overflow="hidden";const d=function(){i(),e.removeEventListener("transitionend",d,!1),e.removeEventListener("transitioncancel",d,!1)};e.addEventListener("transitionend",d,!1),e.addEventListener("transitioncancel",d,!1)},p=e=>{e.style.maxHeight="",e.style.overflow=o.oldOverflow},m=e=>{o.oldPaddingBottom=e.style.paddingBottom,o.oldPaddingTop=e.style.paddingTop,o.oldOverflow=e.style.overflow,e.style.maxHeight=e.scrollHeight+"px",e.style.overflow="hidden"},n=(e,i)=>{e.scrollHeight!==0&&(e.style.maxHeight="0",e.style.paddingBottom="0",e.style.paddingTop="0");const s=function(){i(),e.removeEventListener("transitionend",s,!1),e.removeEventListener("transitioncancel",s,!1)};e.addEventListener("transitionend",s,!1),e.addEventListener("transitioncancel",s,!1)},l=e=>{e.style.maxHeight="",e.style.overflow=o.oldOverflow,e.style.paddingBottom=o.oldPaddingBottom,e.style.paddingTop=o.oldPaddingTop,o.oldOverflow=o.oldPaddingBottom=o.oldPaddingTop=""};return(e,i)=>(t.openBlock(),t.createBlock(t.Transition,{name:"clSlideUpDown",onBeforeEnter:a,onEnter:c,onAfterEnter:p,onBeforeLeave:m,onLeave:n,onAfterLeave:l},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3}))}}),u=g._export_sfc(v,[["__scopeId","data-v-42c7685b"]]),y={class:"collapse-head"},B={class:"collapse-title"},h={class:"collapse-body"},_=t.defineComponent({name:"ClCollapse",__name:"Index",props:{className:{type:String,default:""},isOperate:{type:Boolean,default:!0}},setup(r){const o=r,a=t.reactive({isCollapse:!1}),c=t.computed(()=>{const n={"panel-collapse":!0};return f.CommonBase.isEmpty(o.className)||o.className.split(" ").forEach(l=>{f.CommonBase.isEmpty(l)||(n[l]=!0)}),n}),p=t.computed(()=>({"collapse-operate":!0,clIconFont:!0,"clIcon-angle-down":!0,"icon-rotate":!0,"rotate-180":a.isCollapse})),m=()=>{a.isCollapse=!a.isCollapse};return(n,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(c.value)},[t.createElementVNode("div",y,[t.createElementVNode("div",B,[t.renderSlot(n.$slots,"title")]),r.isOperate?(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass(p.value),onClick:m},null,2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[],64))]),t.createVNode(u,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",h,[t.renderSlot(n.$slots,"default")],512),[[t.vShow,!a.isCollapse]])]),_:3})],2))}});module.exports=_;
//# sourceMappingURL=ClCollapse.cjs.map
