import { createStore } from '@stencil/store';
const { state, onChange, reset } = createStore({
  authUser: null,
  bearer: 'Bearer ',
  isAuthenticated: false
});
onChange('authUser', (authUser) => {
  state.bearer = `Bearer ${authUser ? authUser.JWToken : ''}`;
  state.isAuthenticated = authUser && !!authUser.Id;
});
export const AuthStore = { state, onChange, reset };
