import { CrudClient } from "../infra/crud-client"
import type { ApiClientOptions } from "../infra/client"
import type { ApiPath } from "../infra/types"

export const EXPENSE_ITEM_ROUTES = {
    INDEX: "/api/expense-items",
    BY_ID: "/api/expense-items/{id}",
} as const satisfies Record<string, ApiPath>

export class ExpenseItemsClient extends CrudClient<
    typeof EXPENSE_ITEM_ROUTES.INDEX,
    typeof EXPENSE_ITEM_ROUTES.BY_ID
> {
    constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) {
        super(baseUrl, defaultOptions, EXPENSE_ITEM_ROUTES.INDEX, EXPENSE_ITEM_ROUTES.BY_ID)
    }
}
