import { create } from 'zustand'

type HeaderState = {
  backBtn: boolean
  setBackBtn: (backBtn: boolean) => void
}

type InitialState = {
  backBtn: boolean
}

const initialState: InitialState = {
  backBtn: true,
}

export const useHeaderStore = create<HeaderState>((set) => ({
  ...initialState,
  setBackBtn: (value: boolean) => set((state) => ({ ...state, backBtn: value })),
}))
