import { Status } from "../../../types/variables.mjs"; import { AlertAction } from "../alert/alert.mjs"; import "../alert/index.mjs"; //#region src/components/feedback/toast/context.d.ts type ToastAction = AlertAction; type ToastOptions = { /** * 自動で閉じるまでのミリ秒。`Number.POSITIVE_INFINITY` で自動クローズなし * (閉じるボタンでのみ閉じる)。既定は 5000ms。 */ duration?: number; action?: ToastAction; }; type ToastType = { id: string; tone: Status; message: string; duration: number; action?: ToastAction; /** * 開いた時点のフォーカス位置。閉じたときの返還先候補として使う。 * 参照を握り続けて DOM のリークを起こさないよう WeakRef で持つ。 */ opener?: WeakRef; }; type ToastStore = { open: (tone: Status, message: string, options?: ToastOptions) => void; close: (id: string) => void; closeAll: () => void; }; declare const ToastStoreContext: import("react").Context, useToastStore: () => ToastStore; declare const useToast: () => ToastStore; //#endregion export { ToastAction, ToastOptions, ToastStore, ToastStoreContext, ToastType, useToast, useToastStore };