import type { Account, Attachment, Status } from "@versia/client/schemas"; import mitt from "mitt"; import type { z } from "zod"; type ApplicationEvents = { "note:reply": z.infer; "note:delete": z.infer; "note:edit": z.infer; "note:like": z.infer; "note:unlike": z.infer; "note:reblog": z.infer; "note:unreblog": z.infer; "note:quote": z.infer; "note:report": z.infer; "composer:open": undefined; "composer:reply": z.infer; "composer:quote": z.infer; "composer:edit": z.infer; "composer:send": z.infer; "composer:send-edit": z.infer; "composer:close": undefined; "account:report": z.infer; "account:update": z.infer; "attachment:view": z.infer; "preferences:open": undefined; error: { code: string; title: string; message: string; } | null; }; const emitter = mitt(); export const useEvent = emitter.emit; export const useListen = emitter.on;