import { ref } from 'vue'
import { fetchServiceList as fetchList } from '../../api/service-list'

export function fetchServiceList(menuCode) {
  const list = ref()
  fetchList({
    menuCode: menuCode
  }).then(res => {
    const { content } = res.content
    list.value = content
  })
  return { list }
}
