import '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { useAdminPortalUIConfig } from '../StytchClientContext.mjs';
import { getRoleDefaultDescription } from './getRoleDefaultDescription.mjs';
import { useCallback as T } from '../../../../../node_modules/preact/hooks/dist/hooks.module.mjs';

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

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