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

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

export namespace EnumApi {
  export enum EnumType {
    Gender = 'Gender',
    MenuType = 'MenuType',
    PathType = 'PathType',
    QueryType = 'QueryType',
    Status = 'Status',
    TenantType = 'TenantType',
  }

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

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