defmodule PlausibleWeb.HelpScoutView do use PlausibleWeb, :extra_view def render("callback.html", assigns) do ~H""" <.layout xhr?={assigns[:xhr?]}> <%= cond do %> <% @conn.assigns[:error] -> %>

Failed to get details: {@error}

<% @multiple_teams? -> %>

Owner of teams:

User notes

{PhoenixHTMLHelpers.Format.text_to_html(@notes, escape: true)}
<% true -> %>

Team name

{@team_name}

Status

{@status_label}

Plan

{@plan_label}

Owner of {@sites_count} sites

Notes

{PhoenixHTMLHelpers.Format.text_to_html(@notes, escape: true)}
<% end %> """ end def render("search.html", assigns) do ~H""" <.layout> <%= if @conn.assigns[:error] do %>

Failed to run search: {@error}

<% else %> <% end %> """ end def render("bad_request.html", assigns) do ~H""" <.layout>

Missing expected parameters

""" end attr :xhr?, :boolean, default: false slot :inner_block, required: true defp layout(assigns) do if assigns.xhr? do ~H""" render_slot(@inner_block) """ else ~H""" Helpscout Customer Details
{render_slot(@inner_block)}
""" end end end