@inject Bit.Core.Settings.GlobalSettings GlobalSettings
@model OrganizationViewModel
@{
    ViewData["Title"] = "Organization: " + Model.Organization.DisplayName();
}

<h1>Organization <small>@Model.Organization.DisplayName()</small></h1>

@if (Model.Provider != null)
{
    <h2>Provider Relationship</h2>
    @await Html.PartialAsync("_ProviderInformation", Model.Provider)
}
<h2>Information</h2>
@await Html.PartialAsync("_ViewInformation", Model)
@if(GlobalSettings.SelfHosted)
{
    @await Html.PartialAsync("Connections", Model)
}
<form asp-action="Delete" asp-route-id="@Model.Organization.Id"
      onsubmit="return confirm('Are you sure you want to delete this organization?')">
    <button class="btn btn-danger" type="submit">Delete</button>
</form>
