// Copyright 2017-2026 @pezkuwi/app-accounts authors & contributors
// SPDX-License-Identifier: Apache-2.0

import { render, screen } from '@testing-library/react';
import React from 'react';
import { ThemeProvider } from 'styled-components';
import { lightTheme } from '@pezkuwi/react-components';
import Overview from './index';
import { MemoryRouter } from 'react-router-dom';

// Mock dependencies
jest.mock('@pezkuwi/react-hooks', () => ({
  useAccounts: () => ({ allAccounts: [], hasAccounts: false }),
  useApi: () => ({ api: { tx: {} }, fork: null, isElectron: false }),
  useDelegations: () => [],
  useFavorites: () => [[], () => {}],
  useIpfs: () => ({ isIpfs: false }),
  useLedger: () => ({ isLedgerEnabled: false }),
  useNextTick: () => true,
  useProxies: () => [],
  useToggle: () => [false, () => {}]
}));

jest.mock('../translate', () => ({
  useTranslation: () => ({
    t: (key: string) => key
  })
}));

describe('Pezkuwi UI Enhancements', () => {
  it('renders the Pezkuwi Welcome Card with correct assets', () => {
    render(
      <MemoryRouter>
        <ThemeProvider theme={lightTheme}>
          <Overview onStatusChange={() => {}} />
        </ThemeProvider>
      </MemoryRouter>
    );

    expect(screen.getByText('Pezkuwi Ecosystem')).toBeInTheDocument();
    expect(screen.getByText('HEZ Native')).toBeInTheDocument();
    expect(screen.getByText('PEZ Token')).toBeInTheDocument();
    expect(screen.getByText('wUSDT')).toBeInTheDocument();
  });
});
