import { getActivePinia, type Pinia, type Store } from "pinia";

interface ExtendedPinia extends Pinia {
  _s: Map<string, Store>;
}

export const resetAllPiniaStores = () => {
  (getActivePinia() as ExtendedPinia)?._s?.forEach((store: Store) => store.$reset());
};
