import { ref } from 'vue' import { fetchFloderTypes } from '@/api' import type { FloderTypes, FloderType } from '@/api' export const floderTypes = ref([]) export const getFloderType = (id: FloderType['filesTypeId']) => floderTypes.value.find(type => type.filesTypeId === id) export const initialFloderTypes = async () => { floderTypes.value = await fetchFloderTypes() } export type { FloderType, FloderTypes }