<template>
  <div class="logo">
    <img v-if="!collapsed" src="~@/assets/images/logowithtext.png" alt="" />
    <img v-else src="~@/assets/images/logo.png" class="collapsed-icon" />
    <!-- <h2 v-show="!collapsed" class="title">华信OA</h2> -->
  </div>
</template>

<script setup>
  defineProps({
    collapsed: {
      type: Boolean,
    },
  });
</script>

<style lang="less" scoped>
  .logo {
    @apply flex overflow-hidden whitespace-nowrap items-center justify-center;

    height: 64px;
    line-height: 64px;

    img {
      height: 45px;
    }
    .collapsed-icon {
      height: 35px;
    }

    .title {
      @apply mb-0 text-xl;

      color: @primary-color;
    }
  }
</style>
