import { computed } from 'vue'
import { useResolvedPage } from '~/content/pages'

export function useTrackContent() {
  const trackPage = useResolvedPage('track')
  const ui = computed(() => trackPage.value?.structuredContent?.ui || {})

  const bookingTrackerUi = computed(() => ({
    statusEyebrow: ui.value.statusEyebrow || '',
    missingTokenLabel: ui.value.missingTokenLabel || '',
    loadingLabel: ui.value.loadingLabel || '',
    loadErrorLabel: ui.value.loadErrorLabel || '',
  }))

  return {
    trackPage,
    bookingTrackerUi,
  }
}
