'use client'
import { jsxs, jsx } from 'react/jsx-runtime';
import { classNames } from '../../utils/functions/classNames/classNames.js';
import { Typography } from '../Typography/Typography.js';
import 'react';
import { ReactComponent as SvgDynamicLogo } from '../../assets/dynamic-logo.js';
import { DynamicWidgetFooter } from '../../widgets/DynamicWidget/components/DynamicWidgetFooter/DynamicWidgetFooter.js';
import '@dynamic-labs-sdk/client/core';
import '@dynamic-labs/sdk-api-core';
import '../../client/client.js';
import '@dynamic-labs-sdk/client';
import '../../config/ApiEndpoint.js';
import '@dynamic-labs/iconic';
import '@dynamic-labs/wallet-connector-core';
import '../../context/ViewContext/ViewContext.js';
import '../../shared/logger.js';
import '@dynamic-labs/wallet-book';
import '@dynamic-labs/utils';
import '../../utils/constants/colors.js';
import '../../utils/constants/values.js';
import '../../shared/consts/index.js';
import '../../../../_virtual/_tslib.js';
import '@dynamic-labs/multi-wallet';
import 'react-international-phone';
import '../../store/state/nonce/nonce.js';
import '@dynamic-labs/locale';
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
import '../../store/state/primaryWalletId/primaryWalletId.js';
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
import '../../events/dynamicEvents.js';
import { useProjectSettings } from '../../client/extension/projectSettings/useProjectSettings/useProjectSettings.js';

const URL = 'https://dynamic.xyz';
const alignClassNames = {
    center: 'powered-by-dynamic--center',
    right: 'powered-by-dynamic--right',
};
const PoweredByDynamic = ({ align = 'center', classNameLogo, classNameRoot, classNameText, asFooter, }) => {
    var _a;
    const projectSettings = useProjectSettings();
    if (((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.displayDynamicMessaging) === false) {
        return null;
    }
    const content = (jsxs("a", { target: '_blank', href: URL, className: classNames('powered-by-dynamic', alignClassNames[align], classNameRoot), rel: 'noreferrer', children: [jsx(Typography, { as: 'span', color: 'tertiary', weight: 'regular', variant: 'body_mini', className: classNames('powered-by-dynamic__text', classNameText), children: "Powered by" }), jsx(SvgDynamicLogo, { className: classNames('powered-by-dynamic__logo', classNameLogo) })] }));
    if (asFooter)
        return jsx(DynamicWidgetFooter, { children: content });
    return content;
};

export { PoweredByDynamic };
