import React, { Suspense } from 'react';
import { EmptyState, TextButton } from '@wix/design-system';
import { useWixPatternsContainer } from '@wix/bex-core/react';
import { Refresh } from '@wix/wix-ui-icons-common';
import { ErrorBoundary } from '../ErrorBoundary';
const offlineIllustrationPromise = import(
/* webpackChunkName: "OfflineIllustration" */ './OfflineIllustration');
const OfflineIllustrationLazy = React.lazy(async () => ({
    default: (await offlineIllustrationPromise).OfflineIllustration,
}));
export function OfflineErrorState(props) {
    const { dataHook, onRetry, image, ...rest } = props;
    const { translate: t } = useWixPatternsContainer();
    return (React.createElement(EmptyState, { theme: "page-no-border", dataHook: dataHook, title: t('cairo.connection.error.title'), subtitle: t('cairo.connection.error.text'), image: image ?? (React.createElement(ErrorBoundary, { fallback: null },
            React.createElement(Suspense, { fallback: null },
                React.createElement(OfflineIllustrationLazy, null)))), ...rest },
        React.createElement(TextButton, { dataHook: "retry-button", onClick: onRetry, prefixIcon: React.createElement(Refresh, null) }, t('cairo.error.tryAgain.cta'))));
}
//# sourceMappingURL=OfflineErrorState.js.map