import { useCallback } from 'react';
import { useAdminPortalUIConfig } from '../StytchClientContext.mjs';
import { getRoleDefaultDescription } from './getRoleDefaultDescription.mjs';

const useGetRoleDescription = ()=>{
    const config = useAdminPortalUIConfig();
    return useCallback((role)=>{
        return config?.getRoleDescription?.(role) || getRoleDefaultDescription(role);
    }, [
        config
    ]);
};

export { useGetRoleDescription };
//# sourceMappingURL=useGetRoleDescription.mjs.map
