import{invoke as e,transformCallback as t}from"./core-gjudXfwa.js";var n;(function(e){e.WINDOW_RESIZED=`tauri://resize`,e.WINDOW_MOVED=`tauri://move`,e.WINDOW_CLOSE_REQUESTED=`tauri://close-requested`,e.WINDOW_DESTROYED=`tauri://destroyed`,e.WINDOW_FOCUS=`tauri://focus`,e.WINDOW_BLUR=`tauri://blur`,e.WINDOW_SCALE_FACTOR_CHANGED=`tauri://scale-change`,e.WINDOW_THEME_CHANGED=`tauri://theme-changed`,e.WINDOW_CREATED=`tauri://window-created`,e.WINDOW_SUSPENDED=`tauri://suspended`,e.WINDOW_RESUMED=`tauri://resumed`,e.WEBVIEW_CREATED=`tauri://webview-created`,e.DRAG_ENTER=`tauri://drag-enter`,e.DRAG_OVER=`tauri://drag-over`,e.DRAG_DROP=`tauri://drag-drop`,e.DRAG_LEAVE=`tauri://drag-leave`})(n||={});async function r(t,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,n),await e(`plugin:event|unlisten`,{event:t,eventId:n})}async function i(n,i,a){return e(`plugin:event|listen`,{event:n,target:typeof a?.target==`string`?{kind:`AnyLabel`,label:a.target}:a?.target??{kind:`Any`},handler:t(i)}).then(e=>async()=>r(n,e))}async function a(e,t,n){return i(e,n=>{r(e,n.id),t(n)},n)}async function o(t,n){await e(`plugin:event|emit`,{event:t,payload:n})}async function s(t,n,r){await e(`plugin:event|emit_to`,{target:typeof t==`string`?{kind:`AnyLabel`,label:t}:t,event:n,payload:r})}export{n as TauriEvent,o as emit,s as emitTo,i as listen,a as once};