#### Mail accounts
@if (gmailOAuthUrl) { Connect Gmail Account } @if (outlookOAuthUrl) { Connect Outlook Account }

- Name
  Server
  Username
  Actions
@if (loadingAccounts) {
- Loading...
} @for (account of mailAccounts; track account) {
- {{account.imap_server}}
  {{account.username}}
} @if (!loadingAccounts && mailAccounts.length === 0) {
- No mail accounts defined.
}

#### Mail rules

- Name
  Sort Order
  Account
  Status
  Processed Mail
  Actions
@if (loadingRules) {
- Loading...
} @for (rule of mailRules; track rule) {
- {{rule.order}}
  {{ mailAccountsById.get(rule.account)?.name }}
  `@if(rule.enabled) { Enabled } @else { Disabled }`
} @if (!loadingRules && mailRules.length === 0) {
- No mail rules defined.
}

@if (!mailAccounts || !mailRules) {
Loading...
}