import { defineComponent, computed, createVNode, mergeProps } from 'vue';
import '../hooks/index.mjs';
import initDefaultProps from '../_util/props-util/initDefaultProps.mjs';
import classNames from '../_util/classNames.mjs';
import useStyle from './style/index.mjs';
import Element, { skeletonElementProps } from './Element.mjs';
import useConfigInject from '../config-provider/hooks/useConfigInject.mjs';

const avatarProps = () => {
  return {
    ...skeletonElementProps(),
    shape: String
  };
};
const SkeletonAvatar = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "ASkeletonAvatar",
  props: initDefaultProps(avatarProps(), {
    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, mergeProps(props, {
        "prefixCls": `${prefixCls.value}-avatar`
      }), null)]));
    };
  }
});

export { avatarProps, SkeletonAvatar as default };
//# sourceMappingURL=Avatar.mjs.map
