import type { ServiceStatus } from '~/components/pub/my-ui/service-status/type'
import type { Summary } from '~/components/pub/my-ui/summary-card/type'
import type { HeaderPrep, RefSearchNav } from '~/components/pub/my-ui/data/types'
import { CircleCheckBig, CircleDashed, CircleX, Send } from 'lucide-vue-next'

export const tabs = [
  {
    value: 'all',
    label: 'Semua Resource',
  },
  {
    value: 'patient',
    label: 'Patient',
  },
  {
    value: 'encounter',
    label: 'Encounter',
  },
  {
    value: 'observation',
    label: 'Observation',
  },
]

export const actions = [
  {
    value: 'export',
    label: 'Ekspor',
    icon: 'i-lucide-download',
  },
]

// Status filter options
export const statusOptions = [
  { value: '0', label: 'Failed' },
  { value: '1', label: 'Pending' },
  { value: '2', label: 'Success' },
]
export const summaryData: Summary[] = [
  {
    title: 'Resource Terkirim',
    icon: Send,
    metric: 1245,
    trend: 0,
    timeframe: 'daily',
  },
  {
    title: 'Sync Success',
    icon: CircleCheckBig,
    metric: '97%',
    trend: 0,
    timeframe: 'daily',
  },
  {
    title: 'Pending Queue',
    icon: CircleDashed,
    metric: 32,
    trend: 0,
    timeframe: 'daily',
  },
  {
    title: 'Failed Items',
    icon: CircleX,
    metric: 10,
    trend: 0,
    timeframe: 'daily',
  },
]

// SATUSEHAT Service integration
export const service = reactive<ServiceStatus>({
  serviceName: 'SATUSEHAT',
  serviceDesc: 'SATUSEHAT - FHIR R4 Compliant',
  sessionActive: false,
  status: 'connecting',
  isSkeleton: false,
})

export const headerPrep: HeaderPrep = {
  title: 'SATUSEHAT Integration',
  icon: 'i-lucide-box',
  addNav: {
    label: 'Kirim Resource',
    icon: 'i-lucide-send',
    // onClick: () => navigateTo('/patient/add'),
  },
}

export const refSearchNav: RefSearchNav = {
  onClick: () => {
    // open filter modal
  },
  onInput: (_val: string) => {
  },
  onClear: () => {
  },
}
