/*
 * @Author: micky
 * @Date: 2024-08-10 15:24:06
 * @LastEditors: micky
 * @LastEditTime: 2024-08-20 14:51:23
 * @FilePath: \chargingpile-uniapp\src\stores\tabbar.ts
 */
import { reactive } from 'vue'
import { defineStore } from 'pinia'

export interface TabBarProp {
    text: string
    path: string
    activeIcon: string
    inactiveIcon: string
}
interface TabBarState {
    tabBarList: TabBarProp[]
    activeTabBar: number
}
export const useTabBarStore = defineStore({
    id: 'tabBarStore',
    state: (): TabBarState => ({
        tabBarList: reactive<TabBarProp[]>([]),
        activeTabBar: 0
    }),
    getters: {},
    actions: {
        setTabBarList(tabBarList: TabBarProp[]) {
            this.tabBarList = tabBarList
        },
        setActiveTabBar(index: number) {
            this.activeTabBar = index
        }
    }
})
