/** Service for taxi-related API calls */
import { apiClient } from './apiClient'
import type { Taxi } from '@/types'

export interface TaxiFilters {
    corregimiento?: string
    shift?: string
    english_speaking?: boolean
    is_active?: boolean
}

export const taxisService = {
    /** Get all taxis with optional filters */
    async getAllTaxis(filters?: TaxiFilters): Promise<Taxi[]> {
        const response = await apiClient.get<Taxi[]>('/api/taxis', {
            params: filters,
        })
        return response.data
    },

    /** Get a single taxi by ID */
    async getTaxiById(id: string): Promise<Taxi> {
        const response = await apiClient.get<Taxi>(`/api/taxis/${id}`)
        return response.data
    },
}

