import { defineComponent , h } from 'vue' ; import { Color , Shape , TextColor } from '../props' ; const CAvatar = defineComponent ( { name : 'CAvatar' , props : { values color : Color , values shape : Shape , values size : { type : String , default : undefined , required : false , validator : ( value ) => { return [ 'sm' , 'md' , 'lg' , 'xl' ] . includes ( value ) ; } , } , /**
         * The src attribute for the img element.
         */ src : { type : String , default : undefined , required : false , } , values status : { type : String , default : undefined , required : false , validator : ( value ) => { return [ 'primary' , 'secondary' , 'success' , 'danger' , 'warning' , 'info' , 'dark' , 'light' , ] . includes ( value ) ; } , } , values textColor : TextColor , } , setup ( props , { slots } ) { return ( ) => h ( 'div' , { class : [ 'avatar' , { [ `bg-${ props . color }` ] : props . color , [ `avatar-${ props . size }` ] : props . size , [ `text-${ props . textColor }` ] : props . textColor , } , `${ props . shape }` , ] , } , [ props . src ? h ( 'img' , { src : props . src , class : 'avatar-img' } ) : slots . default && slots . default ( ) , props . status && h ( 'span' , { class : [ 'avatar-status' , `bg-${ props . status }` ] } ) , ] ) ; } , } ) ; export { CAvatar } ;