import { defineComponent, computed, createVNode } from 'vue';
import '../../../utils/index.mjs';
import useConfigInject from '../../config-provider/src/hooks/useConfigInject.mjs';
import useStyle from '../style/index.mjs';
import Element from './Element.mjs';
import { skeletonAvatarProps } from './props.mjs';
import { initDefaultProps } from '../../../utils/vue/initDefaultProps.mjs';
import { classNames } from '../../../utils/dom/class.mjs';

var AAvatar = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: initDefaultProps(skeletonAvatarProps(), {
    size: "default",
    shape: "circle"
  }),
  setup(props) {
    const {
      prefixCls
    } = useConfigInject("skeleton", props);
    const [wrapSSR, hashId] = useStyle(prefixCls);
    const cls = computed(() => classNames(prefixCls.value, `${prefixCls.value}-element`, {
      [`${prefixCls.value}-active`]: props.active
    }, hashId.value));
    return () => {
      return wrapSSR(createVNode("div", {
        "class": cls.value
      }, [createVNode(Element, {
        ...props,
        "prefixCls": `${prefixCls.value}-avatar`
      }, null)]));
    };
  }
});

export { AAvatar as default };
//# sourceMappingURL=Avatar.mjs.map
