import { ref } from 'vue'
import { yjStyleSelector, sdModelList } from '@/api/drawing'

export const useConfigEffect = () => {
    const yjData = ref({
        cartoon: [],
        common: [],
        reality: []
    })

    const sdData = ref([])

    const getYjSdData = async () => {
        try {
            yjData.value = await yjStyleSelector()
        } catch (e) {
            console.log('获取意间数据出现错误==>', e)
        }
    }

    const getSdData = async () => {
        try {
            sdData.value = await sdModelList()
        } catch (e) {
            console.log('获取Sd数据出现错误==>', e)
        }
    }

    return {
        getYjSdData,
        yjData,

        getSdData,
        sdData
    }
}
