import{r as e}from"./utils-BakkG8Vx.js";import{d as t,m as n,s as r,t as i}from"./hooks.module-5xe-uC6c.js";import{N as a,Nt as o,_ as s,v as c}from"./content_renderer-CoENEE63.js";import{t as l}from"./jsxRuntime.module--xb8gfv5.js";import{U as u,Y as d}from"./hooks-CSTgmcXO.js";t();function f({note:t,ntxId:f}){let p=d(`image`),m=i(null),[h,g]=r(0);return n(()=>{let e=o.create(`#${p}`,{maxScale:50,speed:1.3,zoomOnClick:!1});return()=>e.destroy()},[t]),n(()=>s.setupContextMenu(a(m)),[]),u(`copyImageReferenceToClipboard`,({ntxId:e})=>{e===f&&c(a(m))}),u(`entitiesReloaded`,({loadResults:e})=>{e.isNoteReloaded(t.noteId)&&g(h+1)}),l(`div`,{ref:m,className:`note-detail-image-wrapper`,children:l(`img`,{id:p,className:`note-detail-image-view`,src:e(t)})})}export{f as default};