import{r as e}from"./chunk-CMxvf4Kt.js";import{invoke as t,transformCallback as n}from"./core-SwWLTXZB.js";var r=e({TauriEvent:()=>i,emit:()=>c,emitTo:()=>l,listen:()=>o,once:()=>s}),i;(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`})(i||={});async function a(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await t(`plugin:event|unlisten`,{event:e,eventId:n})}async function o(e,r,i){return t(`plugin:event|listen`,{event:e,target:typeof i?.target==`string`?{kind:`AnyLabel`,label:i.target}:i?.target??{kind:`Any`},handler:n(r)}).then(t=>async()=>a(e,t))}async function s(e,t,n){return o(e,n=>{a(e,n.id),t(n)},n)}async function c(e,n){await t(`plugin:event|emit`,{event:e,payload:n})}async function l(e,n,r){await t(`plugin:event|emit_to`,{target:typeof e==`string`?{kind:`AnyLabel`,label:e}:e,event:n,payload:r})}export{o as a,r as i,c as n,s as o,l as r,i as t};