import { MockupAIMonitoringProvider } from '../provider/MockupAIMonitoringProvider'
import type { AIMonitoringFilters } from '../provider/IAIMonitoringProvider'
import type { AIOutput } from '../domain/aiOutput'
import type { ReviewStatus } from '../domain/enums'
import type { ListResponse, ItemResponse } from './types'

const provider = MockupAIMonitoringProvider

export const aiMonitoringService = {
  async getOutputs(filters?: AIMonitoringFilters): Promise<ListResponse<AIOutput>> {
    const data = await provider.getOutputs(filters)
    return { data, meta: { total: data.length, page: 1, pageSize: data.length, hasMore: false } }
  },

  async getOutput(id: string): Promise<ItemResponse<AIOutput | null>> {
    const data = await provider.getOutput(id)
    return { data }
  },

  async updateReviewStatus(id: string, status: ReviewStatus): Promise<ItemResponse<AIOutput>> {
    const data = await provider.updateReviewStatus(id, status)
    return { data }
  },
}
