{{-- The snackbar host: shows every toast, one at a time. Put it once in each layout, near the end of : It shows every `toast` browser event — what `NoNameWeb\LivewireMaterial\Concerns\Toasts` dispatches from a Livewire component — and for `window.materialToast(title, options)` from JavaScript (`{ type, description, timeout, action: { label, handler } }`). Toasts queue and show in turn, each for its `timeout` (4s by default; M3 asks for 4–10s), paused while the pointer or focus is on it. A toast with an action or no timeout gets a close button. `@persist` keeps the host across wire:navigate, so a toast dispatched with `redirectTo` is still on screen when the next page arrives. M3's snackbar (SnackbarTokens, androidx Compose Material 3, Apache-2.0): inverse surface, body-medium text, a label-large action in inverse-primary, extra-small corners, elevation 3, 48px for one line. A type draws its state icon in the inverse state colour. `position`: `bottom` (centred, the default) or `bottom-start`. It lifts above a bottom bar through `--material-bottom-bar`. --}} @props(['position' => 'bottom']) @persist('material-toast')
class([ 'pointer-events-none fixed inset-x-4 z-50 flex bottom-[calc(var(--material-bottom-bar,0px)+1rem)]', 'justify-center' => $position !== 'bottom-start', 'justify-start sm:start-6' => $position === 'bottom-start', ]) }} >
@endpersist