import { defineStore } from 'pinia'
import { store } from '../index'
import { useStorage } from '@/hooks/web/useStorage'

const { setStorage } = useStorage();
export interface RouteStore {
    routeType:string,
}
export const useRouteStore = defineStore('route', {
    state:():RouteStore=>({
        routeType:"ybt",
    }),
    getters:{
        getRouteType():string{
            return this.routeType;
        }
    },
    actions:{
        setRouteType(state:string):void{
            setStorage("routeType",state);
            this.routeType = state;
        },
        filterRouteList(state:Array):void{
            
        }
    }

})

export const useAppStoreWithOut = () => {
    return useRouteStore(store)
}