'use client'
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var jsxRuntime = require('react/jsx-runtime');
var reactI18next = require('react-i18next');
require('@dynamic-labs/utils');
require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
require('react');
var close = require('../../../../shared/assets/close.cjs');
require('@dynamic-labs/iconic');
require('../../../../context/ViewContext/ViewContext.cjs');
var whiteCheckBlackCircle = require('../../../../shared/assets/white-check-black-circle.cjs');
require('../../../../../../_virtual/_tslib.cjs');
require('@dynamic-labs/wallet-connector-core');
require('../../../../shared/logger.cjs');
require('@dynamic-labs/wallet-book');
require('../../../../utils/constants/colors.cjs');
require('../../../../utils/constants/values.cjs');
require('@dynamic-labs/sdk-api-core');
require('../../../../shared/consts/index.cjs');
require('../../../../components/Alert/Alert.cjs');
require('../../../../events/dynamicEvents.cjs');
require('../../../../context/DynamicContext/DynamicContext.cjs');
require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
require('../../../../store/state/authMode/authMode.cjs');
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
require('../../../../context/ErrorContext/ErrorContext.cjs');
require('@dynamic-labs/multi-wallet');
require('react-international-phone');
require('../../../../store/state/nonce/nonce.cjs');
require('@dynamic-labs-sdk/client/core');
require('../../../../client/client.cjs');
require('@dynamic-labs-sdk/client');
require('../../../../config/ApiEndpoint.cjs');
require('@dynamic-labs/locale');
require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
require('../../../../context/VerificationContext/VerificationContext.cjs');
require('react-dom');
require('../../../../utils/functions/compareChains/compareChains.cjs');
require('../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
require('../../../../context/ThemeContext/ThemeContext.cjs');
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
require('bs58');
require('@dynamic-labs/types');
require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
require('../../../../context/LoadingContext/LoadingContext.cjs');
require('../../../../context/WalletContext/WalletContext.cjs');
require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
require('yup');
require('../../../../context/MockContext/MockContext.cjs');
require('../../../../views/CollectUserDataView/useFields.cjs');
require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
require('@dynamic-labs/rpc-providers');
require('../../../../store/state/walletOptions/walletOptions.cjs');
var PoweredByDynamic = require('../../../../components/PoweredByDynamic/PoweredByDynamic.cjs');
require('../../../../context/FooterAnimationContext/index.cjs');
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
require('react-focus-lock');
var Icon = require('../../../../components/Icon/Icon.cjs');
var Typography = require('../../../../components/Typography/Typography.cjs');
var shortenWalletAddress = require('../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
require('../../context/DynamicWidgetContext.cjs');
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
require('formik');
require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
require('../../../../store/state/sendBalances.cjs');
require('../../../../components/Input/Input.cjs');
require('../../../../components/OverlayCard/OverlayCard.cjs');
require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
require('../../../../context/PasskeyContext/PasskeyContext.cjs');
require('../../components/PasskeyCard/PasskeyCard.cjs');
require('../CryptoComOnramp/CryptoComOnramp.cjs');
require('../../../../context/OnrampContext/OnrampContext.cjs');
require('../../../../../index.cjs');
require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
require('qrcode');
require('../ReceiveWalletFunds/ReceiveWalletFunds.cjs');
require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
require('@hcaptcha/react-hcaptcha');
require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
require('../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
require('../../../../store/state/tokenBalances.cjs');
require('../../../../store/state/multichainBalances.cjs');
require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
require('../../../../components/InlineWidget/InlineWidget.cjs');
require('../../../../components/IsBrowser/IsBrowser.cjs');
require('../../../../components/Popper/Popper/Popper.cjs');
require('../../../../components/Popper/PopperContext/PopperContext.cjs');

const DepositedExchangeView = ({ transaction, onClose, onSubmit, toAddress, onView, }) => {
    const { t } = reactI18next.useTranslation();
    const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', id: 'close-button', "data-testid": 'close-button', onClick: () => {
            onClose();
        }, children: jsxRuntime.jsx(close.ReactComponent, {}) }));
    return (jsxRuntime.jsxs("div", { className: 'deposited-exchange-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', copykey: 'dyn_deposited_exchange.title', children: t('dyn_deposited_exchange.title') }) }), jsxRuntime.jsxs("div", { className: 'deposited-exchange-view__container', children: [jsxRuntime.jsx("div", { className: 'deposited-exchange-view__container__icon-holder', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', className: 'fund-from-wallet__content__wallet-card__balance__icon-holder__icon', children: jsxRuntime.jsx(whiteCheckBlackCircle.ReactComponent, { "data-testid": 'token-select-dropdown' }) }) }), jsxRuntime.jsx("div", { className: 'deposited-exchange-view__container__description', children: jsxRuntime.jsxs(Typography.Typography, { className: 'deposited-exchange-view__container__description__text', children: [jsxRuntime.jsxs("strong", { children: [transaction.amount, " ", transaction.currency] }), t('dyn_deposited_exchange.description', {
                                    address: shortenWalletAddress.shortenWalletAddress(toAddress),
                                })] }) }), jsxRuntime.jsxs("div", { className: 'deposited-exchange-view__container__buttons', children: [jsxRuntime.jsx("div", { className: 'deposited-exchange-view__container__buttons__button', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'done-button', buttonVariant: 'brand-primary', buttonPadding: 'large', className: 'deposited-exchange-view__container__buttons__button__button', typographyProps: { color: 'white' }, onClick: () => {
                                        onSubmit();
                                    }, copykey: 'dyn_deposited_exchange.done', children: t('dyn_deposited_exchange.done') }) }), jsxRuntime.jsx("div", { className: 'deposited-exchange-view__container__buttons__button', children: onView && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'view-button', buttonVariant: 'secondary', buttonPadding: 'large', className: 'deposited-exchange-view__container__buttons__button__button', typographyProps: { color: 'primary' }, onClick: () => {
                                        onView();
                                    }, copykey: 'dyn_deposited_exchange.view', children: t('dyn_deposited_exchange.view') })) })] })] }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { asFooter: true })] }));
};

exports.DepositedExchangeView = DepositedExchangeView;
