import{jsx as o}from"react/jsx-runtime";import{z as r,I as t,c as i,D as e,m as a}from"./index-CQXsL1YZ.js";import"react";import{I as s}from"./ImageErrorBoundary-CO_f5xdF.js";import"react-dom";import"@bbodek/hooks";import"@bbodek/utils";import"overlay-kit";const n=({src:n,size:h,viewerSize:d,downloadOptions:m,previewOptions:l,className:p,isError:c,onLoad:w,onError:f})=>{const{rotate:g,fitMode:u,scale:x}=l,{width:E,height:k}=u===r.WIDTH?{width:h.width&&h.width*x}:{height:h.height&&h.height*x};return o(s,{errorComponent:o(a,{downloadOptions:m}),isError:c,children:o(t,{className:i(p,"fill-center max-h-none max-w-none shrink-0 will-change-[rotate] transform-fill",e.ROTATE[g]),alt:"",height:0,sizes:`${E??d.width}px`,src:n,style:{width:E??"auto",height:k??"auto"},width:0,onError:f,onLoad:w})})};export{n as default};
//# sourceMappingURL=PreviewImage-D7sHp2Yb.js.map
