import { request } from '../utils/fetch';
import { api } from '../constants/config';
import { MaterialSquare, ResourcesType } from 'models/adminPanel.types';

export async function getLabelsByType(type: MaterialSquare): Promise<string[]> {
  return request(api.getLabelsByType, undefined, { type: type });
}

export async function getLabelsById(id: number, resourceType: ResourcesType): Promise<{ names: string[] }> {
  return request(api.getLabelsById, { id }, { resourceType: resourceType });
}
