import type { BasicOptionResult, BasicTreeOptionResult } from '#/api/model';

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

export namespace EnumApi {
  export enum EnumType {
    TenantType = 'TenantType',
  }

  export const getList = (name: string) =>
    requestClient.get<BasicOptionResult[]>('/enum/list', {
      params: { name },
    });

  export const getTree = () =>
    requestClient.get<BasicTreeOptionResult[]>('/enum/tree');
}
