import{defineComponent as w,computed as g,createVNode as i}from"vue";import{EyeOutlined as d}from"@antsoo-lib/icons";import I from"../_util/classNames.mjs";import{getTransitionName as l}from"../_util/transition.mjs";import P from"../config-provider/hooks/useConfigInject.mjs";import N from"../locale/en_US.mjs";import k,{imageProps as C}from"../vc-image/src/Image.mjs";import G,{icons as x}from"./PreviewGroup.mjs";import y from"./style/index.mjs";const o=w({name:"AImage",inheritAttrs:!1,props:C(),setup(e,{slots:n,attrs:u}){const{prefixCls:t,rootPrefixCls:m,configProvider:f}=P("image",e),[c,p]=y(t),v=g(()=>{const{preview:r}=e;if(r===!1)return r;const a=typeof r=="object"?r:{};return{icons:x,...a,transitionName:l(m.value,"zoom",a.transitionName),maskTransitionName:l(m.value,"fade",a.maskTransitionName)}});return()=>{const r=f.locale?.value?.Image||N.Image,a=()=>i("div",{class:`${t.value}-mask-info`},[i(d,null,null),r?.preview]),{previewMask:s=n.previewMask||a}=e;return c(i(k,{...u,...e,prefixCls:t.value,preview:v.value,rootClassName:I(e.rootClassName,p.value)},{...n,previewMask:typeof s=="function"?s:null}))}}});o.PreviewGroup=G;o.install=function(e){return e.component(o.name,o),e.component(o.PreviewGroup.name,o.PreviewGroup),e};export{G as ImagePreviewGroup,o as default,C as imageProps};
