// #ifndef APP-ANDROID || APP-IOS
import iconList from '../../static/icons.json';
// uni.loadFontFace({
// 	global: true,
// 	// scopes: ['native'],
// 	family: 't',
// 	source: 'url("https://tdesign.gtimg.com/icon/0.2.0/fonts/t.ttf")'
// })
export const icons = ref<Map<string, any | null>>((iconList as UTSJSONObject).toMap())
// #endif

// #ifdef APP-ANDROID || APP-IOS
export const icons = ref<Map<string, any | null>>(new Map<string, any|null>())
const manager = uni.getFileSystemManager();
if (icons.value.size == 0) {
	manager.readFile({
		filePath: 'uni_modules/lime-icon/static/icons.json',
		encoding: 'utf-8',
		success: (res) => {
			const obj = JSON.parseObject(res.data as string)
			if(obj == null) return
			icons.value = obj.toMap();
		}
	} as ReadFileOptions);
}
// setTimeout(()=>{
// 	uni.loadFontFace({
// 		global: true,
// 		// scopes: ['native'],
// 		family: 't',
// 		source: 'url("/uni_modules/lime-icon/hybrid/html/t.ttf")'
// 	})
// },0)
// #endif
