<template>
  <img v-if="tenant?.logoFile" :src="tenant?.logoFile" class="site-logo" />
  <BmsCocarde v-else :initials="getInitials(tenant.label)" size="small" />
</template>

<script setup lang="ts">
import { getInitials } from '@/helpers/cocarde.helper';
import { BmsCocarde } from '@/index';
import { Tenant } from '@/models';

defineProps<{
  tenant: Tenant;
}>();
</script>

<style>
.site-logo {
  display: block;
  border: 1px solid var(--bms-border-color);
  border-radius: 50%;
}
</style>
