<template>
  <div class="navbar-wrap">
    <div class="left-wrap">
      <div class="h-full flex items-center cursor-pointer" @click="handleUserHome">
        <img src="@/assets/LOGO.svg" alt="" />
      </div>
    </div>
    <div class="flex-1">
      <NavbarMenu v-if="!isAgentRoute"/>
    </div>
    <RightSide :isAgentRoute="isAgentRoute" v-if="userStore.isLogin"/>
  </div>
</template>

<script setup>
import NavbarMenu from './components/navbar-menu';
import RightSide from './components/right-side';

import { useUserStore } from '@/stores';
import { handleUserHome } from '@/utils/user.ts';
import router from '@/router';

const route = useRoute();
const userStore = useUserStore();

const isAgentRoute = computed(() => {
  return route.meta?.isAgentRoute;
});
</script>
<style scoped lang="scss">
.navbar-wrap {
  display: flex;
  justify-content: space-between;
  height: 100%;
  background-color: var(--color-bg-2);
  border-bottom: 1px solid var(--color-border);
  .left-wrap {
    display: flex;
    align-items: center;
    padding-left: 24px;
  }
  .arco-dropdown-option-suffix {
    display: none;
  }
  .enterprises-doption {
    .arco-dropdown-option-content {
      padding: 0 !important;
      border-radius: 8px;
    }
    &:not(.arco-dropdown-option-disabled):hover {
      background-color: transparent;
      .arco-dropdown-option-content {
        background: var(--BG-200, #f2f3f5);
      }
    }
  }
}
</style>
