import { defineStore } from "pinia";

export const useUIStore = defineStore("ui", {
    state: (): {
        theme: string;
    } => ({
        theme: "light",
    }),
    getters: {},
    actions: {
        setTheme(theme: string) {
            this.theme = theme;
            document.documentElement.setAttribute("theme", theme);
            localStorage.setItem("theme", theme);
        },
    },
});
