// redux/slices/isoChartTypeSlice.ts
import { createSlice, PayloadAction } from "@reduxjs/toolkit";

interface isoChartTypeState {
  chartTitle: string;
}

const initialState: isoChartTypeState = {
  chartTitle: "Isolationsmessung", // Standardwert
};

const isoChartTypeSlice = createSlice({
  name: "isoChartType",
  initialState,
  reducers: {
    setChartTitle: (state, action: PayloadAction<string>) => {
      state.chartTitle = action.payload;
    },
  },
});

export const { setChartTitle } = isoChartTypeSlice.actions;
export default isoChartTypeSlice.reducer;
