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

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

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

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