import cloneDeep from 'lodash/cloneDeep'

export default function resetStore(data: { store: any }) {
  const initialState = cloneDeep(data.store.$state)

  data.store.$reset = () => data.store.$patch(cloneDeep(initialState))
}
