import { xfetch } from '~/composables/useXfetch' export async function getSourceMaterials() { const resp = await xfetch('/api/v1/material') if (resp.success) { return (resp.body as Record).data } throw new Error('Failed to fetch source materials') }