import axios from 'axios'; import type { ThemeSettings } from '../../share/types.ts'; const API_BASE_URL = '/api'; export interface ThemeSettingsResponse { message: string; data: ThemeSettings; } export const ThemeAPI = { getThemeSettings: async (): Promise => { try { const response = await axios.get(`${API_BASE_URL}/theme`); return response.data.data; } catch (error) { throw error; } }, updateThemeSettings: async (themeData: Partial): Promise => { try { const response = await axios.put(`${API_BASE_URL}/theme`, themeData); return response.data.data; } catch (error) { throw error; } }, resetThemeSettings: async (): Promise => { try { const response = await axios.post(`${API_BASE_URL}/theme/reset`); return response.data.data; } catch (error) { throw error; } } };