{"version":3,"file":"AvatarRoot.cjs","sources":["../../src/Avatar/AvatarRoot.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { ImageLoadingStatus } from './utils'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface AvatarRootProps extends PrimitiveProps {}\n\nexport type AvatarRootContext = {\n  imageLoadingStatus: Ref<ImageLoadingStatus>\n}\n\nexport const [injectAvatarRootContext, provideAvatarRootContext]\n  = createContext<AvatarRootContext>('AvatarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<AvatarRootProps>(), {\n  as: 'span',\n})\n\nuseForwardExpose()\n\nprovideAvatarRootContext({\n  imageLoadingStatus: ref<ImageLoadingStatus>('loading'),\n})\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n"],"names":["createContext","useForwardExpose","ref"],"mappings":";;;;;;;AAYO,MAAM,CAAC,uBAAA,EAAyB,wBAAwB,CAAA,GAC3DA,mCAAiC,YAAY;;;;;;;;AAWjD,IAAiBC,wCAAA,EAAA;AAEjB,IAAyB,wBAAA,CAAA;AAAA,MACvB,kBAAA,EAAoBC,QAAwB,SAAS;AAAA,KACtD,CAAA;;;;;;;;;;;;;;;;;;"}