| 1 |
import { defineStore } from "pinia"; |
| 2 |
import { ref } from "vue"; |
| 3 |
import { snakeToCamelObj } from "@/utils/services"; |
| 4 |
import { STORE_PERSISTENT_KEYS, HostingerToolsData } from "@/types"; |
| 5 |
|
| 6 |
export const useGeneralStoreData = defineStore( |
| 7 |
"generalStoreData", |
| 8 |
() => { |
| 9 |
const toolsData = ref<HostingerToolsData>( |
| 10 |
// @ts-ignore |
| 11 |
snakeToCamelObj(hostinger_tools_data) |
| 12 |
); |
| 13 |
|
| 14 |
return { |
| 15 |
...toolsData.value, |
| 16 |
}; |
| 17 |
}, |
| 18 |
{ |
| 19 |
persist: { key: STORE_PERSISTENT_KEYS.TOOLS_GENERAL_DATA_STORE }, |
| 20 |
} |
| 21 |
); |
| 22 |
|