%= turbo_stream_from Current.user, :notifications %>
<%= tag.dialog id: "notification-tray", class: "tray notification-tray",
data: { controller: "dialog",
turbo_permanent: true,
dialog_modal_value: false,
dialog_target: "dialog",
action: "keydown.esc->dialog#close:stop click@document->dialog#closeOnClickOutside" } do %>
<%= turbo_frame_tag("notifications", src: notifications_tray_path) -%>
<%= link_to notifications_path, class: "tray__overflow border-radius txt-normal", data: { action: "click->dialog#close"} do %>
<% end %>
<%= button_to notifications_mark_all_read_path,
class: "notification-tray__read_action btn btn--reversed fill-transparent borderless flex-item-justify-start shadow txt-xx-small",
data: { action: "click->dialog#close", turbo_frame: "notifications" } do %>
<%= icon_tag "check" %>
Mark all read
<% end %>
<%= link_to notifications_path,
class: "btn btn--reversed borderless fill-transparent translucent shadow center txt-uppercase txt-x-small",
data: { action: "click->dialog#close"} do %>
Notifications
<% end %>
<% end %>