import { useFetchJson } from "@/composable/useFetchJson";
import type { Resp } from "@/types";
import type { Settings } from "@/types/settings";
import { reactive } from "vue";

export const settings = reactive({} as Settings)

export async function getSettings() {
    const { items } = await useFetchJson<Resp<Settings>>('/api/v1/settings',)
    Object.assign(settings, items)
}
