import { createSlice as a } from "../../../../node_modules/.pnpm/@reduxjs_toolkit@2.5.1_react-redux@9.2.0_@types_react@19.0.10_react@19.0.0_redux@5.0.1__react@19.0.0/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js";
import m from "../../../../_virtual/index.js";
import { ThemeConfiguration as c } from "../config/theme.config.js";
const o = {
  activeTheme: {
    id: "default",
    name: "Default",
    settings: c.settings
  }
}, n = a({
  name: "theme",
  initialState: o,
  reducers: {
    setActiveTheme: (e, t) => {
      e.activeTheme = t.payload;
    },
    setActiveThemeSettings: (e, t) => {
      e.activeTheme.settings = t.payload;
    },
    setActiveThemeSettingsValueByKey: (e, t) => {
      t.payload.forEach(({ key: i, value: s }) => {
        m.set(e.activeTheme.settings, i, s);
      });
    }
  }
}), { setActiveTheme: l, setActiveThemeSettings: v, setActiveThemeSettingsValueByKey: g } = n.actions;
export {
  l as setActiveTheme,
  v as setActiveThemeSettings,
  g as setActiveThemeSettingsValueByKey,
  n as themeSlice
};
//# sourceMappingURL=theme-slice.js.map
