import{_ as v,r as i,w as p,o as _,c as f,v as a,aa as g,N as o}from"./index.8d733f79.js";const h={style:{width:"100%",height:"100%"}},b={__name:"dashboard-collapse",props:{visible:{type:Boolean,default:!0},btnPosition:{type:String,default:"right"},direction:{type:String,default:"horizontal"}},emits:["toggle"],setup(c,{emit:n}){const l=c,e=i(l.visible),s=i(!1);p(()=>l.visible,t=>{e.value=t});const d=()=>{e.value?r():u()},r=()=>{s.value=!0,setTimeout(()=>{e.value=!1,n("toggle",s.value,e.value)},200)},u=()=>{e.value=!0,s.value=!1,n("toggle",s.value,e.value)};return(t,m)=>(_(),f("div",{class:o(["collapse-container",[l.direction,l.btnPosition]])},[a("div",{class:o(["collapse-content",[l.direction,s.value?"closed":""]])},[a("div",h,[g(t.$slots,"content",{visible:e.value},void 0,!0)])],2),a("div",{class:o(["btn-collapse",[l.btnPosition,e.value?"":"collapse"]]),onClick:d},null,2)],2))}},C=v(b,[["__scopeId","data-v-6179080d"]]);export{C as default};
