import { requestClient } from '#/api/request';

const prefix = 'system-config/';

export async function getSystemConfigList() {
  return requestClient.get<any>(`${prefix}list`);
}

export async function saveSystemConfig(items: Array<{ config_key: string; config_value: string }>) {
  return requestClient.post<any>(`${prefix}save`, { items });
}

export async function getPriceAdjustConfig(storeId?: number) {
  return requestClient.get<any>(`${prefix}price-adjust-config`, {
    params: storeId ? { store_id: storeId } : {},
  });
}
