import { defineComponent , h , RendererElement , Transition } from 'vue' ; const CBackdrop = defineComponent ( { name : 'CBackdrop' , props : { /**
         * Toggle the visibility of modal component.
         */ visible : { type : Boolean , default : false , required : false , } , } , setup ( props ) { const handleBeforeEnter = ( el ) => { el . classList . remove ( 'd-none' ) ; } ; const handleEnter = ( el , done ) => { el . addEventListener ( 'transitionend' , ( ) => { done ( ) ; } ) ; setTimeout ( ( ) => { el . style . visibility = 'visible' ; el . classList . add ( 'show' ) ; } , 1 ) ; } ; const handleLeave = ( el , done ) => { el . addEventListener ( 'transitionend' , ( ) => { done ( ) ; } ) ; el . classList . remove ( 'show' ) ; } ; const handleAfterLeave = ( el ) => { el . classList . add ( 'd-none' ) ; } ; return ( ) => h ( Transition , { onBeforeEnter : ( el ) => handleBeforeEnter ( el ) , onEnter : ( el , done ) => handleEnter ( el , done ) , onLeave : ( el , done ) => handleLeave ( el , done ) , onAfterLeave : ( el ) => handleAfterLeave ( el ) , } , ( ) => props . visible && h ( 'div' , { class : 'fade' , } ) ) ; } , } ) ; export { CBackdrop } ;