import api from './api';

export const getConfig = async () => {
  const response = await api.get('/config');
  return response.data;
};

export const getFullConfig = async () => {
  const response = await api.get('/config/admin');
  return response.data;
};

export const updateConfig = async (configData) => {
  const response = await api.put('/config', configData);
  return response.data;
};

export const uploadLogo = async (base64DataUrl) => {
  const response = await api.post('/config/logo', { logo: base64DataUrl });
  return response.data;
};

export const deleteLogo = async () => {
  const response = await api.delete('/config/logo');
  return response.data;
};