import useRouterStore, { type RouteStr } from '@/useRouterStore' import { computed, defineComponent, ref, Transition, watch } from 'vue' import { OhVueIcon, addIcons } from 'oh-vue-icons' import { MdClose, MdOpeninfull, MdClosefullscreen } from 'oh-vue-icons/icons' import asyncLoader from './utils/asyncLoader' import widgetList from '@/widgets' addIcons(MdClose, MdOpeninfull, MdClosefullscreen) const SearchPage = asyncLoader(() => import('@/layout/header/search/SearchPage')) const AdderPage = asyncLoader(() => import('@/layout/adder/AdderPage')) const noFullList: RouteStr[] = ['global-search', 'global-adder'] export default defineComponent(() => { const router = useRouterStore() const show = computed( () => router.path.startsWith('widget-') || router.path === 'global-search' || router.path === 'global-adder' ) const full = ref(false) watch(router, () => { full.value = false }) return () => (