import React, { ReactElement, useEffect } from 'react';
import Head from 'next/head'
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import dayjs from "dayjs";
import {useAppDispatch, useAppSelector} from "../../stores/hooks";
import {useRouter} from "next/router";
import { fetch } from '../../stores/trading_accounts/trading_accountsSlice'
import {saveFile} from "../../helpers/fileSaver";
import dataFormatter from '../../helpers/dataFormatter';
import ImageField from "../../components/ImageField";
import LayoutAuthenticated from "../../layouts/Authenticated";
import {getPageTitle} from "../../config";
import SectionTitleLineWithButton from "../../components/SectionTitleLineWithButton";
import SectionMain from "../../components/SectionMain";
import CardBox from "../../components/CardBox";
import BaseButton from "../../components/BaseButton";
import BaseDivider from "../../components/BaseDivider";
import {mdiChartTimelineVariant} from "@mdi/js";
import {SwitchField} from "../../components/SwitchField";
import FormField from "../../components/FormField";


const Trading_accountsView = () => {
    const router = useRouter()
    const dispatch = useAppDispatch()
    const { trading_accounts } = useAppSelector((state) => state.trading_accounts)
    

    const { id } = router.query;
    
    function removeLastCharacter(str) {
      console.log(str,`str`)
      return str.slice(0, -1);
    }

    useEffect(() => {
        dispatch(fetch({ id }));
    }, [dispatch, id]);


    return (
      <>
          <Head>
              <title>{getPageTitle('View trading_accounts')}</title>
          </Head>
          <SectionMain>
            <SectionTitleLineWithButton icon={mdiChartTimelineVariant} title={removeLastCharacter('View trading_accounts')} main>
                <BaseButton
                  color='info'
                  label='Edit'
                  href={`/trading_accounts/trading_accounts-edit/?id=${id}`}
                />
            </SectionTitleLineWithButton>
            <CardBox>
            

              

              

              

              

              

              

              

              

              

              
              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>User</p>
                    
                    
                        <p>{trading_accounts?.user?.firstName ?? 'No data'}</p>
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                </div>
                 
              

              

              

              
              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>AccountName</p>
                    <p>{trading_accounts?.name}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>BrokerName</p>
                    <p>{trading_accounts?.broker_name}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>BaseCurrency</p>
                    <p>{trading_accounts?.base_currency}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              

              

              

              
                <div className={'mb-4'}>
                  <p className={'block font-bold mb-2'}>StartingBalance</p>
                  <p>{trading_accounts?.starting_balance || 'No data'}</p>
                </div>
              

              

              

              

              

              

              

              

              

              
              

              

              

              

              
                <div className={'mb-4'}>
                  <p className={'block font-bold mb-2'}>CurrentBalance</p>
                  <p>{trading_accounts?.current_balance || 'No data'}</p>
                </div>
              

              

              

              

              

              

              

              

              

              
              

              

              

              

              
                <div className={'mb-4'}>
                  <p className={'block font-bold mb-2'}>DefaultRiskPerTrade</p>
                  <p>{trading_accounts?.risk_per_trade_default || 'No data'}</p>
                </div>
              

              

              

              

              

              

              

              

              

              
              

              

              

              

              

              

              

              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>RiskUnit</p>
                    <p>{trading_accounts?.risk_unit ?? 'No data'}</p>
                </div>
              

              

              

              

              

              
              

              

              

              

              

              

              

              

              

              
                <FormField label='IsArchived'>
                    <SwitchField
                      field={{name: 'is_archived', value: trading_accounts?.is_archived}}
                      form={{setFieldValue: () => null}}
                      disabled
                    />
                </FormField>
              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='OpenedAt'>
                    {trading_accounts.opened_at ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={trading_accounts.opened_at ?
                        new Date(
                          dayjs(trading_accounts.opened_at).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No OpenedAt</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

              

              

              

              

              

              
                <FormField label='ArchivedAt'>
                    {trading_accounts.archived_at ? <DatePicker
                      dateFormat="yyyy-MM-dd hh:mm"
                      showTimeSelect
                      selected={trading_accounts.archived_at ?
                        new Date(
                          dayjs(trading_accounts.archived_at).format('YYYY-MM-DD hh:mm'),
                        ) : null
                      }
                      disabled
                    /> : <p>No ArchivedAt</p>}
                </FormField>
              

              

              

              

              

              

              

              
              

                
                
                
                
                
                
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Trades TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Direction</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>Timeframe</th>
                                
                                
                                
                                <th>EntryAt</th>
                                
                                
                                
                                <th>ExitAt</th>
                                
                                
                                
                                <th>EntryPrice</th>
                                
                                
                                
                                <th>ExitPrice</th>
                                
                                
                                
                                <th>StopLossPrice</th>
                                
                                
                                
                                <th>TakeProfitPrice</th>
                                
                                
                                
                                <th>PositionSize</th>
                                
                                
                                
                                <th>PositionSizeUnit</th>
                                
                                
                                
                                <th>Fees</th>
                                
                                
                                
                                <th>Slippage</th>
                                
                                
                                
                                <th>PnLAmount</th>
                                
                                
                                
                                <th>PnLPercent</th>
                                
                                
                                
                                <th>RiskAmount</th>
                                
                                
                                
                                <th>RiskRewardRatio</th>
                                
                                
                                
                                <th>MaxAdverseExcursion</th>
                                
                                
                                
                                <th>MaxFavorableExcursion</th>
                                
                                
                                
                                <th>DurationMinutes</th>
                                
                                
                                
                                <th>IsWin</th>
                                
                                
                                
                                <th>Notes</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.trades_trading_account && Array.isArray(trading_accounts.trades_trading_account) &&
                              trading_accounts.trades_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/trades/trades-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="direction">
                                        { item.direction }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="timeframe">
                                        { item.timeframe }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="entry_at">
                                        { dataFormatter.dateTimeFormatter(item.entry_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="exit_at">
                                        { dataFormatter.dateTimeFormatter(item.exit_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="entry_price">
                                        { item.entry_price }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="exit_price">
                                        { item.exit_price }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="stop_loss_price">
                                        { item.stop_loss_price }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="take_profit_price">
                                        { item.take_profit_price }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="position_size">
                                        { item.position_size }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="position_size_unit">
                                        { item.position_size_unit }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="fees">
                                        { item.fees }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="slippage">
                                        { item.slippage }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pnl_amount">
                                        { item.pnl_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="pnl_percent">
                                        { item.pnl_percent }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="risk_amount">
                                        { item.risk_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="rr_ratio">
                                        { item.rr_ratio }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="mae_amount">
                                        { item.mae_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="mfe_amount">
                                        { item.mfe_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="duration_minutes">
                                        { item.duration_minutes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_win">
                                        { dataFormatter.booleanFormatter(item.is_win) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="notes">
                                        { item.notes }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.trades_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Goals TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Title</th>
                                
                                
                                
                                <th>Description</th>
                                
                                
                                
                                <th>GoalType</th>
                                
                                
                                
                                <th>TargetValue</th>
                                
                                
                                
                                <th>CurrentValue</th>
                                
                                
                                
                                <th>Period</th>
                                
                                
                                
                                <th>StartAt</th>
                                
                                
                                
                                <th>EndAt</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.goals_trading_account && Array.isArray(trading_accounts.goals_trading_account) &&
                              trading_accounts.goals_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/goals/goals-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="description">
                                        { item.description }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="goal_type">
                                        { item.goal_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="target_value">
                                        { item.target_value }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="current_value">
                                        { item.current_value }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period">
                                        { item.period }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="start_at">
                                        { dataFormatter.dateTimeFormatter(item.start_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="end_at">
                                        { dataFormatter.dateTimeFormatter(item.end_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.goals_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Csv_import_jobs TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>OriginalFilename</th>
                                
                                
                                
                                <th>MappingJson</th>
                                
                                
                                
                                <th>TotalRows</th>
                                
                                
                                
                                <th>ImportedRows</th>
                                
                                
                                
                                <th>FailedRows</th>
                                
                                
                                
                                <th>ErrorSummary</th>
                                
                                
                                
                                <th>StartedAt</th>
                                
                                
                                
                                <th>FinishedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.csv_import_jobs_trading_account && Array.isArray(trading_accounts.csv_import_jobs_trading_account) &&
                              trading_accounts.csv_import_jobs_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/csv_import_jobs/csv_import_jobs-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="original_filename">
                                        { item.original_filename }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="mapping_json">
                                        { item.mapping_json }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="total_rows">
                                        { item.total_rows }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="imported_rows">
                                        { item.imported_rows }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="failed_rows">
                                        { item.failed_rows }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="error_summary">
                                        { item.error_summary }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="started_at">
                                        { dataFormatter.dateTimeFormatter(item.started_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="finished_at">
                                        { dataFormatter.dateTimeFormatter(item.finished_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.csv_import_jobs_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Broker_connections TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Broker</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>ConnectionLabel</th>
                                
                                
                                
                                <th>SyncEnabled</th>
                                
                                
                                
                                <th>LastSyncAt</th>
                                
                                
                                
                                <th>LastError</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.broker_connections_trading_account && Array.isArray(trading_accounts.broker_connections_trading_account) &&
                              trading_accounts.broker_connections_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/broker_connections/broker_connections-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="broker">
                                        { item.broker }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="connection_label">
                                        { item.connection_label }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sync_enabled">
                                        { dataFormatter.booleanFormatter(item.sync_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_sync_at">
                                        { dataFormatter.dateTimeFormatter(item.last_sync_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="last_error">
                                        { item.last_error }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.broker_connections_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Ai_insight_runs TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>RunType</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>PeriodStartAt</th>
                                
                                
                                
                                <th>PeriodEndAt</th>
                                
                                
                                
                                <th>PromptSnapshot</th>
                                
                                
                                
                                <th>OutputSummary</th>
                                
                                
                                
                                <th>ConsistencyScore</th>
                                
                                
                                
                                <th>CompletedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.ai_insight_runs_trading_account && Array.isArray(trading_accounts.ai_insight_runs_trading_account) &&
                              trading_accounts.ai_insight_runs_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/ai_insight_runs/ai_insight_runs-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="run_type">
                                        { item.run_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period_start_at">
                                        { dataFormatter.dateTimeFormatter(item.period_start_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period_end_at">
                                        { dataFormatter.dateTimeFormatter(item.period_end_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="prompt_snapshot">
                                        { item.prompt_snapshot }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="output_summary">
                                        { item.output_summary }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="consistency_score">
                                        { item.consistency_score }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="completed_at">
                                        { dataFormatter.dateTimeFormatter(item.completed_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.ai_insight_runs_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Alert_rules TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>RuleType</th>
                                
                                
                                
                                <th>IsEnabled</th>
                                
                                
                                
                                <th>ThresholdValue</th>
                                
                                
                                
                                <th>ThresholdUnit</th>
                                
                                
                                
                                <th>Notes</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.alert_rules_trading_account && Array.isArray(trading_accounts.alert_rules_trading_account) &&
                              trading_accounts.alert_rules_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/alert_rules/alert_rules-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="rule_type">
                                        { item.rule_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_enabled">
                                        { dataFormatter.booleanFormatter(item.is_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="threshold_value">
                                        { item.threshold_value }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="threshold_unit">
                                        { item.threshold_unit }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="notes">
                                        { item.notes }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.alert_rules_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Pdf_reports TradingAccount</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Title</th>
                                
                                
                                
                                <th>ReportType</th>
                                
                                
                                
                                <th>PeriodStartAt</th>
                                
                                
                                
                                <th>PeriodEndAt</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>ErrorMessage</th>
                                
                                
                                
                                <th>GeneratedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {trading_accounts.pdf_reports_trading_account && Array.isArray(trading_accounts.pdf_reports_trading_account) &&
                              trading_accounts.pdf_reports_trading_account.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/pdf_reports/pdf_reports-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="title">
                                        { item.title }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="report_type">
                                        { item.report_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period_start_at">
                                        { dataFormatter.dateTimeFormatter(item.period_start_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="period_end_at">
                                        { dataFormatter.dateTimeFormatter(item.period_end_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="error_message">
                                        { item.error_message }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="generated_at">
                                        { dataFormatter.dateTimeFormatter(item.generated_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!trading_accounts?.pdf_reports_trading_account?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                

                <BaseDivider />

                <BaseButton
                    color='info'
                    label='Back'
                    onClick={() => router.push('/trading_accounts/trading_accounts-list')}
                />
              </CardBox>
          </SectionMain>
      </>
    );
};

Trading_accountsView.getLayout = function getLayout(page: ReactElement) {
    return (
      <LayoutAuthenticated
        
        permission={'READ_TRADING_ACCOUNTS'}
        
      >
          {page}
      </LayoutAuthenticated>
    )
}

export default Trading_accountsView;