import { apiGet, apiPost, apiPut, apiDelete } from './apiClient.js';

export async function getContacts({ limit = 100, page = 1 } = {}) {
    return apiGet(`/api/Contacts?limit=${limit}&page=${page}`);
}

export async function getContactById(id) {
    return apiGet(`/api/Contacts/${id}`);
}

export async function createContact(data) {
    return apiPost('/api/Contacts', data);
}

export async function updateContact(id, data) {
    return apiPut(`/api/Contacts/${id}`, data);
}

export async function deleteContact(id) {
    return apiDelete(`/api/Contacts/${id}`);
}
