import { create } from "zustand"

interface EditProfileState {
  pending: boolean
  valid: boolean
}

interface EditProfileActions {
  setIsPending: (isPending: boolean) => void
  setValid: (isValid: boolean) => void
}

export interface EditProfileStore
  extends EditProfileActions,
  EditProfileState { }

export const useProfileStore = create<EditProfileStore>()((set) => ({
  pending: false,
  valid: true,

  setIsPending: (isPending) => set(() => ({ pending: isPending })),
  setValid: (isValid) => set(() => ({ valid: isValid })),
}))
