<template>
  <div class="logo-container">
    <img alt="logo" src="@/assets/csthyylogoplain.png"/>
    <h1 v-if="showText">
      {{ systemTitle }}
      <br/>
      <span style="font-size: 12px">编码:{{ systemStore.hospitalCode }} </span>
    </h1>
  </div>
</template>

<script setup lang="ts">
import {systemTitle} from '@/config'
import {useSystemStore} from "@/pinia/system-store";

withDefaults(defineProps<{
  showText?: boolean;
}>(), {
  showText: true
})

const systemStore = useSystemStore()

</script>

<style lang="scss">
.logo-container {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--el-menu-bg-color);

  img {
    width: 28px
  }

  h1 {
    font-size: 12px;
    white-space: nowrap;
    color: black;
    margin-left: 5px;
  }
}
</style>
