import { makeStateKey } from '@angular/core';

import { Tenant } from './tenant.interface';

export type TenantBootstrapStatus = 'idle' | 'ready' | 'not-found';

export type TenantSsrState =
  | {
      status: 'ready';
      tenant: Tenant;
    }
  | {
      status: 'not-found';
    };

export const DEFAULT_TENANT_BRANDING = {
  primaryColor: '#102bda',
  secondaryColor: '#9e9e9e',
  dangerColor: '#fd4c4c',
  successColor: '#198754',
  headerBgColor: '#313131',
  footerBgColor: '#313131'
} as const;

export const TENANT_SSR_STATE_KEY = makeStateKey<TenantSsrState | null>('tenant-ssr-state');
