import { create } from 'zustand';

interface HomeTabBarVisibilityState {
  /** 首页列表下滑时隐藏底部 Tab，上滑或闲置后恢复 */
  bottomTabBarHiddenByScroll: boolean;
  setBottomTabBarHiddenByScroll: (hidden: boolean) => void;
}

export const useHomeTabBarVisibilityStore = create<HomeTabBarVisibilityState>((set) => ({
  bottomTabBarHiddenByScroll: false,
  setBottomTabBarHiddenByScroll: (hidden) => set({ bottomTabBarHiddenByScroll: hidden }),
}));
