/**
 * API Client — catálogo público GTipoTrailer (tipos de trailer/caja)
 */
import { api } from '$lib/api';

export interface TrailerType {
	trailer_type_key: string;
	description?: string | null;
}

export interface TrailerTypeListResponse {
	items: TrailerType[];
	total: number;
	page: number;
	page_size: number;
}

export const trailerTypesApi = {
	list: (page = 1, pageSize = 100) =>
		api.get<TrailerTypeListResponse>(
			`/v1/public/reference_data/trailer-types/?page=${page}&page_size=${pageSize}`
		)
};
