import { create } from 'zustand';

interface HomeTabPressState {
  /** 用于触发首页回到顶部的事件计数器 */
  pressCount: number;
  /** 触发首页 Tab 点击事件 */
  triggerPress: () => void;
}

export const useHomeTabPressStore = create<HomeTabPressState>((set) => ({
  pressCount: 0,
  triggerPress: () => set((state) => ({ pressCount: state.pressCount + 1 })),
}));
