import { xfetch } from '~/composables/useXfetch'

export async function getMedicineMethods() {
  const resp = await xfetch('/api/v1/medicine-method')
  if (resp.success) {
    return (resp.body as Record<string, any>).data
  }
  throw new Error('Failed to fetch medicine methods')
}
