import { get, post } from '@/api/request';

const env = import.meta.env;
const PREFIX = env.VITE_API_PREFIX_DATA;

export const saveTemplateWithHierarchiesApi = (params: any) => {
  return post(`${PREFIX}dimensionTemplate/saveTemplateWithHierarchies`, params);
};

export const getTemplateWithHierarchiesApi = (params: any) => {
  return get(`${PREFIX}dimensionTemplate/getTemplateWithHierarchies`, params);
};

export const getAllTemplateApi = (params: any) => {
  return post(`${PREFIX}dimensionTemplate/getAllTemplate`, params);
};

export const deleteTemplateWithHierarchiesApi = (params: { id: number }) => {
  return get(`${PREFIX}dimensionTemplate/deleteTemplateWithHierarchies`, params);
};

export const getSimulationNodeTreeApi = (params: any) => {
  return post(`${PREFIX}dataOverView/getSimulationNodeTree`, params);
};
