import{n}from"./_plugin-vue2_normalizer.61652a7c.js";const s={props:{active:Boolean,duration:{type:Number,default:500},tag:{type:String,default:"div"},useHidden:{type:Boolean,default:!0}},data(){return{style:{},initial:!1,hidden:!1}},watch:{active(){this.$nextTick(()=>{this.layout()})}},mounted(){this.layout(),this.initial=!0},created(){this.hidden=!this.active},computed:{el(){return this.$refs.container&&this.$refs.container.$el?this.$refs.container.$el:this.$refs.container||null}},methods:{layout(){this.active?(this.hidden=!1,this.$emit("open-start"),this.initial&&this.setHeight("0px",()=>this.el.scrollHeight+"px")):(this.$emit("close-start"),this.setHeight(this.el.scrollHeight+"px",()=>"0px"))},asap(e){this.initial?this.$nextTick(e):e()},setHeight(e,t){this.style={height:e},this.asap(()=>{this.__=this.el.scrollHeight,this.style={height:t(),overflow:"hidden","transition-property":"all","transition-duration":this.duration+"ms"}})},onTransitionEnd(e){e.target===this.el&&(this.active?(this.style={},this.$emit("open-end")):(this.style={height:"0",overflow:"hidden"},this.hidden=!0,this.$emit("close-end")))}}};var r=function(){var t=this,i=t._self._c;return i(t.tag,{ref:"container",tag:"component",style:t.style,attrs:{"aria-hidden":!t.active,"aria-expanded":t.active},on:{transitionend:t.onTransitionEnd}},[t.hidden?t._e():t._t("default")],2)},a=[],o=n(s,r,a,!1,null,null,null,null);const h=o.exports;export{h as T};
