import { createSlice } from "@reduxjs/toolkit"
import {
  addExpandedWidgetReducer,
  changeSelectedAction,
  clearSelectedComponent,
  minusScale,
  plusScale,
  removeExpandWidgetReducer,
  removeExpandedKey,
  resetConfig,
  resetSelectedActionReducer,
  setDraggingNodeIDsReducer,
  setExpandedKey,
  setResizingNodeIDsReducer,
  updateBottomPanel,
  updateCachedAction,
  updateStylePanel,
  // updateCachedActionMockConfigReducer,
  updateCanvasShapeReducer,
  updateDebuggerVisible,
  updateDevicesOnlineStatusReducer,
  updateHoveredComponent,
  updateImpaktAppsMode,
  updateLeftPanel,
  updateRightPanel,
  updateSelectedComponent,
  updateShowDot,
  updateGridContainer,
  updateCachedActionAdvancedConfigReducer,
  updateSelectedClass,
  updateThemePanel,
  updateSelectedThemePanel,
  updateSelectedScreen,
  resetLayoutSection,
  updateLayoutSection,
  updateScreenPanel,
  updateMovedWidget,
  updateCopiedWidget
  // updateWSStatusReducer,
} from "@/redux/config/configReducer"
import { ConfigInitialState } from "@/redux/config/configState"

const configSlice = createSlice({
  name: "config",
  initialState: ConfigInitialState,
  reducers: {
    updateCopiedWidget,
    updateMovedWidget,
    resetConfig,
    updateImpaktAppsMode,
    updateLeftPanel,
    updateRightPanel,
    updateBottomPanel,
    updateDebuggerVisible,
    updateShowDot,
    updateSelectedComponent,
    clearSelectedComponent,
    changeSelectedAction,
    updateCachedAction,
    updateCachedActionAdvancedConfigReducer,
    updateStylePanel,
    // updateCachedActionMockConfigReducer,
    plusScale,
    minusScale,
    setExpandedKey,
    removeExpandedKey,
    updateCanvasShapeReducer,
    updateDevicesOnlineStatusReducer,
    updateSelectedClass,
    // updateWSStatusReducer,
    updateHoveredComponent,
    resetSelectedActionReducer,
    addExpandedWidgetReducer,
    removeExpandWidgetReducer,
    setDraggingNodeIDsReducer,
    setResizingNodeIDsReducer,
    updateGridContainer,
    updateSelectedThemePanel,
    updateSelectedScreen,
    updateThemePanel,
    resetLayoutSection,
    updateLayoutSection,
    updateScreenPanel
  },
})

export const configActions = configSlice.actions
export default configSlice.reducer
