import create from 'zustand';

export const [productListControlsStore] = create(set => ({
    viewType: null,
    setViewType: viewType => set(() => ({ viewType })),

    // original visibility of filters is hidden on mobile, shown on desktop
    isFiltersVisible: false,
    setFiltersVisible: isFiltersVisible => set(() => ({ isFiltersVisible })),

    listingSidebarTitle: null,
    setListingSidebarTitle: listingSidebarTitle => set(() => ({ listingSidebarTitle }))
}));
