import { ui18n } from "@/lang"; import { FOLDER_TYPE_LIST } from "./constant"; import axios from "./instance"; export interface FloderType { filesTypeId: number; filesTypeName: string; parentId: number; modalShow?: boolean; flatShow?: boolean; } export type FloderTypes = FloderType[]; export const fetchFloderTypes = async () => { const types = await axios.get(FOLDER_TYPE_LIST); types.push({ filesTypeId: -1, filesTypeName: ui18n.t('floder.photo'), flatShow: false, modalShow: false, parentId: 39, }); return types; };