import { stackFactory, flatStacksValue, strToParams } from '@/utils' import { ref } from 'vue' import type { Model, TaggingPosition } from '@/store' export const viewModeStack = stackFactory(ref<'full' | 'auto'>('auto')) export const showToolbarStack = stackFactory(ref(false)) export const showRightPanoStack = stackFactory(ref(true)) export const showLeftPanoStack = stackFactory(ref(false)) export const showLeftCtrlPanoStack = stackFactory(ref(true)) export const showRightCtrlPanoStack = stackFactory(ref(true)) export const showTaggingsStack = stackFactory(ref(true)) export const currentModelStack = stackFactory(ref(null)) export const showModelsMapStack = stackFactory(ref>(new Map)) export const modelsChangeStoreStack = stackFactory(ref(false)) export const showTaggingPositionsStack = stackFactory(ref>(new WeakSet())) // export const showModelsChangeStoreStack = stackFactory export const custom = flatStacksValue({ viewMode: viewModeStack, showToolbar: showToolbarStack, showRightPano: showRightPanoStack, showLeftPano: showLeftPanoStack, showLeftCtrlPano: showLeftCtrlPanoStack, shwoRightCtrlPano: showRightCtrlPanoStack, showTaggings: showTaggingsStack, currentModel: currentModelStack, showModelsMap: showModelsMapStack, modelsChangeStore: modelsChangeStoreStack, showTaggingPositions: showTaggingPositionsStack }) export const params = strToParams(location.search) as Params export type Params = { m: string, id: string, fushId: string, token?: string }