import { createContext } from "react";
export type ToastVariant = "info" | "success" | "error";
export interface Toast {
id: string;
import { StreamActions } from "@hotwired/turbo"
StreamActions.flash = function () {
const container = document.getElementById("flashes")
if (!container) return
import React from 'react';
import { useToasts } from './useToasts';
export function Toaster() {
const { toasts, dismiss } = useToasts();
import { Controller } from "@hotwired/stimulus"
import { NotificationsApi } from "notifications_api"
export default class extends Controller {
static targets = ["notification"]
static values = {