/*! ratio-ui · design system for knowledge sharing · https://github.com/losol/ratio-ui · (c) 2026 Losol AS · MPL-2.0 */
import { toastQueue } from "./toastQueue.js";
//#region src/toast/useToast.ts
var addToast = (toast) => {
	const { message, status = "info", description, expiresAfter = 1e4 } = toast;
	return toastQueue.add({
		message,
		status,
		description
	}, { timeout: expiresAfter });
};
var withStatus = (status) => (message, options) => addToast({
	status,
	message,
	...options
});
var useToast = () => ({
	success: withStatus("success"),
	error: withStatus("error"),
	warning: withStatus("warning"),
	info: withStatus("info"),
	remove: (key) => toastQueue.close(key)
});
//#endregion
export { useToast };

//# sourceMappingURL=useToast.js.map