import{i,t as d}from"./core-DZAvsxlC.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||(n={}));async function _(e,a){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,a),await i("plugin:event|unlisten",{event:e,eventId:a})}async function u(e,a,t){var r;const l=typeof(t==null?void 0:t.target)=="string"?{kind:"AnyLabel",label:t.target}:(r=t==null?void 0:t.target)!==null&&r!==void 0?r:{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:d(a)}).then(D=>async()=>_(e,D))}async function c(e,a,t){return u(e,r=>{_(e,r.id),a(r)},t)}async function s(e,a){await i("plugin:event|emit",{event:e,payload:a})}async function o(e,a,t){await i("plugin:event|emit_to",{target:typeof e=="string"?{kind:"AnyLabel",label:e}:e,event:a,payload:t})}export{n as TauriEvent,s as emit,o as emitTo,u as listen,c as once};
