<script lang="ts" setup>
import type { Ref } from 'vue';
import { inject } from 'vue';
import { configKey } from '../../utils/injectedKeys';
import type { LayoutConfig } from './types';

const { config } = inject<{ config: Ref<LayoutConfig> }>(configKey)!;
</script>

<template>
  <div v-if="config.isLogo" class="u-logo">
    <slot name="logo" />
  </div>
</template>

<style scoped>
.u-logo {
  position: relative;
  width: auto;
  height: 46px;
  min-height: 46px;
  max-height: 100%;
  max-width: 100%;
}
</style>
