<.link navigate={~p"/maintenance"} class="inline-flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200" > <.icon name="hero-arrow-left" class="h-4 w-4" /> {t("Back to Maintenance Windows")}
<% status = status_for(@window) %> <%!-- Active banner --%> <%= if status == :active do %>
<.icon name="hero-wrench-screwdriver" class="h-6 w-6 text-green-600 dark:text-green-400" />

{t("Currently Active")}

{t("This maintenance window is currently in effect. Alerts are being suppressed.")}

<% end %>

{@window.name}

{status_label(status)}
<.link navigate={~p"/maintenance/#{@window.id}/edit"} class="inline-flex items-center gap-2 rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors" > <.icon name="hero-pencil" class="h-4 w-4" /> {t("Edit")}
<%!-- Reason --%> <%= if @window.reason do %>
{t("Reason")}
{@window.reason}
<% end %> <%!-- Scope --%>
{t("Scope")}
{scope_label(@window)}
<%!-- Time Range --%>
{t("Time Range")}
{format_datetime(@window.starts_at, @timezone)} — {format_datetime( @window.ends_at, @timezone )}
<%!-- Recurring --%>
{t("Recurring")}
<%= if @window.recurring do %> {t("Yes")} — {@window.recurrence_rule || t("No rule specified")} <% else %> {t("No")} <% end %>
<%!-- Suppress Alerts --%>
{t("Suppress Alerts")}
<%= if @window.suppress_alerts do %> <.icon name="hero-check-circle" class="h-4 w-4" /> {t("Yes")} <% else %> <.icon name="hero-x-circle" class="h-4 w-4" /> {t("No")} <% end %>
<%!-- Created By --%>
{t("Created By")}
{if @window.created_by, do: @window.created_by.email, else: "—"}