import { axiosClient } from '../../../api/axiosClient'
import type { PermisoDto } from './types'

export async function getRolPermisos(rolCodigo: string): Promise<PermisoDto[]> {
  const response = await axiosClient.get<PermisoDto[]>(
    `/api/v1/roles/${encodeURIComponent(rolCodigo)}/permisos`,
  )
  return response.data
}
