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

const initialState = {
  disabled: false,
};

const polylineEventsDisabledSlice = createSlice({
  name: "polylineEventsDisabled",
  initialState,
  reducers: {
    setDisabled: (state, action) => {
      state.disabled = action.payload;
    },
    toggleDisabled: (state) => {
      state.disabled = !state.disabled;
    },
  },
});

export const { setDisabled, toggleDisabled } = polylineEventsDisabledSlice.actions;
export default polylineEventsDisabledSlice.reducer;
