import { type ActionType, makeStore } from '@brainly-gene/core';

export interface AppStoreType {
  hello: string;
  originUrl?: URL;
};

const appInitialState = {
  hello: 'world',
};

const appReducer = (state: AppStoreType, action: ActionType) => {
  switch (action.type) {
    default:
      return state;
  }
};

const [Provider, useDispatch, useStore] = makeStore<AppStoreType, ActionType>(
  appInitialState,
  appReducer
);

export { Provider, useDispatch, useStore };
