// redux/slices/selectedPoiSlice.js
import { createSlice } from "@reduxjs/toolkit";

export const selectedPoiSlice = createSlice({
  name: "selectedPoi",
  initialState: null,
  reducers: {
    setSelectedPoi: (state, action) => action.payload, // Speichert POI-Daten
    clearSelectedPoi: () => null, // Entfernt POI aus dem State
  },
});

export const { setSelectedPoi, clearSelectedPoi } = selectedPoiSlice.actions;
export default selectedPoiSlice.reducer;
