import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { PropsWithChildren } from 'react';
import { LoadingAnimationProps } from './LoadingAnimation.js';
import { ErrorComponentProps } from './ErrorComponent.js';
import '../../localization/useTranslation.js';
import '../../localization/util.js';
import '../../localization/defaults/form.js';

type LoadingAndErrorComponentProps = PropsWithChildren<{
    isLoading?: boolean;
    hasError?: boolean;
    loadingProps?: LoadingAnimationProps;
    errorProps?: ErrorComponentProps;
    /**
     * in milliseconds
     */
    minimumLoadingDuration?: number;
}>;
/**
 * A Component that shows the Error and Loading animation, when appropriate and the children otherwise
 */
declare const LoadingAndErrorComponent: ({ children, isLoading, hasError, errorProps, loadingProps, minimumLoadingDuration }: LoadingAndErrorComponentProps) => string | number | boolean | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element;

export { LoadingAndErrorComponent, type LoadingAndErrorComponentProps };
