<template>
  <el-space class="hidden-sm-and-down sm:w-[140px] sm:flex sm:mb-0 mb-5 w-full pr-7" direction="vertical">
      <div class="py-2" v-for="(item,index) in activities" :index="`${item.path}`" :key="index">
        <el-button :icon="item.icon" link class="text-gray-500" plain @click="navigateTo(item.path)">{{ item.name }}</el-button>
      </div>
  </el-space>
</template>

<script setup lang="ts">
import {User,Lock,Postcard,Tickets,SwitchButton} from '@element-plus/icons-vue'
import {navigateTo} from "#imports";

withDefaults(
    defineProps<{
      layout?: any;
      activeIndex?: string;
    }>(),
    {}
);

const emit = defineEmits<{
  (e: 'done', index: string): void;
  (e: 'update:visible', visible: boolean): void;
}>();

const activities = [
  {
    icon: User,
    name: '账号信息',
    path: '/user'
  },
  // {
  //   icon: Lock,
  //   name: '密码修改',
  //   path: '/user/password'
  // },
  {
    icon: Postcard,
    name: '实名认证',
    path: '/user/auth'
  },
  {
    icon: SwitchButton,
    name: '退出登录',
    path: '/user/logout'
  },
]


const handleSelect = (index: string) => {
  emit('done', index)
}

</script>
<style lang="scss">
.custom-menu-item:hover {
  background-color: #ffffff;
}

</style>
