import { ChecklistItem as SDKChecklistItem } from '@/lib/sdk'
import { DisplayStatus } from './types'

// =============================================================================
// HELPER FUNCTIONS
// =============================================================================

export function mapSDKStatusToDisplay(status: SDKChecklistItem['status']): DisplayStatus {
  switch (status) {
    case 'PASSED': return 'compliant'
    case 'FAILED': return 'non-compliant'
    case 'NOT_APPLICABLE': return 'partial'
    case 'PENDING':
    default: return 'not-reviewed'
  }
}

export function mapDisplayStatusToSDK(status: DisplayStatus): SDKChecklistItem['status'] {
  switch (status) {
    case 'compliant': return 'PASSED'
    case 'non-compliant': return 'FAILED'
    case 'partial': return 'NOT_APPLICABLE'
    case 'not-reviewed':
    default: return 'PENDING'
  }
}
