import { request } from './request';
import { apiClient } from './axiosClient';

export const requestGetCardType = async () => {
    const response = await apiClient.get('/api/deposit/card-types');
    return response.data;
};

export const requestCreateCardType = async (data) => {
    const response = await apiClient.post('/api/deposit/card-types', data);
    return response.data;
};

export const requestUpdateCardType = async (id, data) => {
    const response = await apiClient.put(`/api/deposit/card-types/${id}`, data);
    return response.data;
};

export const requestDeleteCardType = async (id) => {
    const response = await apiClient.delete(`/api/deposit/card-types/${id}`);
    return response.data;
};

export const requestGetCardConfigs = async () => {
    const response = await apiClient.get('/api/deposit/card-configs');
    return response.data;
};

export const requestUpdateCardConfig = async (data) => {
    const response = await apiClient.post('/api/deposit/card-configs', data);
    return response.data;
};
