<script setup>
import {useSystemStore} from "../../pinia/SystemStore/index.js";
import {useUserStore} from "../../pinia/UserStore/index.js";

const SystemStore = useSystemStore();
const UserStore = useUserStore();
</script>

<template>
    <div class="w-full h-full flex items-center px-[24px] box-border bg-white">
        <div class="title">
            代发平台-{{ SystemStore.isRoot ? '管理员' : '商家' }}
        </div>

        <div class="ml-auto">
            <a-dropdown>
                <a-link
                    :hoverable="false">
                    {{ UserStore?.userInfo?.nickname || UserStore?.userInfo?.mobile }}
                    <icon-down/>
                </a-link>
                <template #content>
                    <a-doption @click="UserStore?.logout">退出登陆</a-doption>
                </template>
            </a-dropdown>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.title {
    color: rgb(29, 33, 41);
    font-family: PingFang SC;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    text-align: left;
}
</style>
