import { isEmpty } from "radash"; import { serviceEnum } from "../constant/index"; export const useEnum = ( key: string | undefined, value: string | number | undefined ) => { if (isEmpty(key) || isEmpty(value)) return ""; return serviceEnum[key!][value]; };