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/users/usersSlice'
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 UsersView = () => {
    const router = useRouter()
    const dispatch = useAppDispatch()
    const { users } = useAppSelector((state) => state.users)
    

    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 users')}</title>
          </Head>
          <SectionMain>
            <SectionTitleLineWithButton icon={mdiChartTimelineVariant} title={removeLastCharacter('View users')} main>
                <BaseButton
                  color='info'
                  label='Edit'
                  href={`/users/users-edit/?id=${id}`}
                />
            </SectionTitleLineWithButton>
            <CardBox>
            

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>First Name</p>
                    <p>{users?.firstName}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>Last Name</p>
                    <p>{users?.lastName}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>Phone Number</p>
                    <p>{users?.phoneNumber}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>E-Mail</p>
                    <p>{users?.email}</p>
                </div>
              

              

              

              

              

              

              

              

              

              

              

              

              
              

              

              

              

              

              

              

              

              

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

              

              

              

              
              

              

              

              

              

              

              

              

              

              

              

              

              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>Avatar</p>
                    {users?.avatar?.length
                      ? (
                        <ImageField
                          name={'avatar'}
                          image={users?.avatar}
                          className='w-20 h-20'
                        />
                      ) : <p>No Avatar</p>
                    }
                </div>
              

              
              

              

              

              

              

              

              

              

              

              

              
              
                <div className={'mb-4'}>
                    <p className={'block font-bold mb-2'}>App Role</p>
                    
                    
                    
                    
                        <p>{users?.app_role?.name ?? 'No data'}</p>
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                </div>
                 
              

              

              

              
              

              

              

              

              

              

              

              

              

              

              

              
                <>
                    <p className={'block font-bold mb-2'}>Custom Permissions</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                    <th>Name</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.custom_permissions && Array.isArray(users.custom_permissions) &&
                              users.custom_permissions.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/permissions/permissions-view/?id=${item.id}`)}>
                                  
                                    
                                    
                                  
                                    
                                    <td data-label="name">
                                        { item.name }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.custom_permissions?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
              

              

              
              

                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Posts Author</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>PostType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>LinkURL</th>
                                
                                
                                
                                <th>Visibility</th>
                                
                                
                                
                                <th>CommentsEnabled</th>
                                
                                
                                
                                <th>Pinned</th>
                                
                                
                                
                                <th>SensitiveContent</th>
                                
                                
                                
                                <th>Location</th>
                                
                                
                                
                                <th>LanguageCode</th>
                                
                                
                                
                                <th>PublishedAt</th>
                                
                                
                                
                                <th>ScheduledFor</th>
                                
                                
                                
                                <th>LikeCount</th>
                                
                                
                                
                                <th>CommentCount</th>
                                
                                
                                
                                <th>ShareCount</th>
                                
                                
                                
                                <th>ViewCount</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.posts_author && Array.isArray(users.posts_author) &&
                              users.posts_author.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/posts/posts-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="post_type">
                                        { item.post_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="link_url">
                                        { item.link_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="visibility">
                                        { item.visibility }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="comments_enabled">
                                        { dataFormatter.booleanFormatter(item.comments_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_pinned">
                                        { dataFormatter.booleanFormatter(item.is_pinned) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_sensitive">
                                        { dataFormatter.booleanFormatter(item.is_sensitive) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="location_text">
                                        { item.location_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="language_code">
                                        { item.language_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="published_at">
                                        { dataFormatter.dateTimeFormatter(item.published_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scheduled_for">
                                        { dataFormatter.dateTimeFormatter(item.scheduled_for) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="like_count">
                                        { item.like_count }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="comment_count">
                                        { item.comment_count }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="share_count">
                                        { item.share_count }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="view_count">
                                        { item.view_count }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.posts_author?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Comments Author</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>Comment</th>
                                
                                
                                
                                
                                
                                <th>Edited</th>
                                
                                
                                
                                <th>Pinned</th>
                                
                                
                                
                                <th>LikeCount</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.comments_author && Array.isArray(users.comments_author) &&
                              users.comments_author.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/comments/comments-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="body">
                                        { item.body }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_edited">
                                        { dataFormatter.booleanFormatter(item.is_edited) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="is_pinned">
                                        { dataFormatter.booleanFormatter(item.is_pinned) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="like_count">
                                        { item.like_count }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.comments_author?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Reactions User</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>TargetType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>ReactionType</th>
                                
                                
                                
                                <th>ReactedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.reactions_user && Array.isArray(users.reactions_user) &&
                              users.reactions_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/reactions/reactions-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="target_type">
                                        { item.target_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reaction_type">
                                        { item.reaction_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="reacted_at">
                                        { dataFormatter.dateTimeFormatter(item.reacted_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.reactions_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Stories Author</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>StoryType</th>
                                
                                
                                
                                <th>TextOverlay</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>Visibility</th>
                                
                                
                                
                                <th>PublishedAt</th>
                                
                                
                                
                                <th>ExpiresAt</th>
                                
                                
                                
                                <th>ViewCount</th>
                                
                                
                                
                                <th>AllowReplies</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.stories_author && Array.isArray(users.stories_author) &&
                              users.stories_author.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/stories/stories-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="story_type">
                                        { item.story_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="text_overlay">
                                        { item.text_overlay }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="visibility">
                                        { item.visibility }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="published_at">
                                        { dataFormatter.dateTimeFormatter(item.published_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="expires_at">
                                        { dataFormatter.dateTimeFormatter(item.expires_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="view_count">
                                        { item.view_count }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="allow_replies">
                                        { dataFormatter.booleanFormatter(item.allow_replies) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.stories_author?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Messages Sender</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>MessageType</th>
                                
                                
                                
                                <th>Message</th>
                                
                                
                                
                                
                                
                                <th>Edited</th>
                                
                                
                                
                                <th>SentAt</th>
                                
                                
                                
                                <th>DeliveredAt</th>
                                
                                
                                
                                <th>ReadAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.messages_sender && Array.isArray(users.messages_sender) &&
                              users.messages_sender.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/messages/messages-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="message_type">
                                        { item.message_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="body">
                                        { item.body }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_edited">
                                        { dataFormatter.booleanFormatter(item.is_edited) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sent_at">
                                        { dataFormatter.dateTimeFormatter(item.sent_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="delivered_at">
                                        { dataFormatter.dateTimeFormatter(item.delivered_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="read_at">
                                        { dataFormatter.dateTimeFormatter(item.read_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.messages_sender?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Groups Owner</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>Name</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>PrivacyLevel</th>
                                
                                
                                
                                <th>MembershipApproval</th>
                                
                                
                                
                                
                                
                                <th>Verified</th>
                                
                                
                                
                                <th>MemberCount</th>
                                
                                
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.groups_owner && Array.isArray(users.groups_owner) &&
                              users.groups_owner.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/groups/groups-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="name_text">
                                        { item.name_text }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="privacy_level">
                                        { item.privacy_level }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="membership_approval">
                                        { item.membership_approval }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_verified">
                                        { dataFormatter.booleanFormatter(item.is_verified) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="member_count">
                                        { item.member_count }
                                    </td>
                                    
                                    
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.groups_owner?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Events Host</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>Visibility</th>
                                
                                
                                
                                <th>Location</th>
                                
                                
                                
                                <th>OnlineURL</th>
                                
                                
                                
                                <th>StartsAt</th>
                                
                                
                                
                                <th>EndsAt</th>
                                
                                
                                
                                <th>Capacity</th>
                                
                                
                                
                                <th>RequiresTicket</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.events_host && Array.isArray(users.events_host) &&
                              users.events_host.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/events/events-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="title_text">
                                        { item.title_text }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="visibility">
                                        { item.visibility }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="location_text">
                                        { item.location_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="online_url">
                                        { item.online_url }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="starts_at">
                                        { dataFormatter.dateTimeFormatter(item.starts_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ends_at">
                                        { dataFormatter.dateTimeFormatter(item.ends_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="capacity">
                                        { item.capacity }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requires_ticket">
                                        { dataFormatter.booleanFormatter(item.requires_ticket) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.events_host?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Tickets Buyer</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>TicketCode</th>
                                
                                
                                
                                <th>PriceAmount</th>
                                
                                
                                
                                <th>CurrencyCode</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>PurchasedAt</th>
                                
                                
                                
                                <th>CheckedInAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.tickets_buyer && Array.isArray(users.tickets_buyer) &&
                              users.tickets_buyer.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/tickets/tickets-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="ticket_code">
                                        { item.ticket_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="price_amount">
                                        { item.price_amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="currency_code">
                                        { item.currency_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="purchased_at">
                                        { dataFormatter.dateTimeFormatter(item.purchased_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="checked_in_at">
                                        { dataFormatter.dateTimeFormatter(item.checked_in_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.tickets_buyer?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Notifications Recipient</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>NotificationType</th>
                                
                                
                                
                                <th>Title</th>
                                
                                
                                
                                <th>Body</th>
                                
                                
                                
                                <th>Priority</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Read</th>
                                
                                
                                
                                <th>SentAt</th>
                                
                                
                                
                                <th>ReadAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.notifications_recipient && Array.isArray(users.notifications_recipient) &&
                              users.notifications_recipient.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/notifications/notifications-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="notification_type">
                                        { item.notification_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="title_text">
                                        { item.title_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="body_text">
                                        { item.body_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="priority">
                                        { item.priority }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="is_read">
                                        { dataFormatter.booleanFormatter(item.is_read) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sent_at">
                                        { dataFormatter.dateTimeFormatter(item.sent_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="read_at">
                                        { dataFormatter.dateTimeFormatter(item.read_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.notifications_recipient?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>User_settings User</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>PushNotificationsEnabled</th>
                                
                                
                                
                                <th>EmailNotificationsEnabled</th>
                                
                                
                                
                                <th>SMSNotificationsEnabled</th>
                                
                                
                                
                                <th>ThemePreference</th>
                                
                                
                                
                                <th>LanguagePreference</th>
                                
                                
                                
                                <th>ShowSensitiveContent</th>
                                
                                
                                
                                <th>AllowMessageRequests</th>
                                
                                
                                
                                <th>ReadReceiptsEnabled</th>
                                
                                
                                
                                <th>ActivityStatusVisible</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.user_settings_user && Array.isArray(users.user_settings_user) &&
                              users.user_settings_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/user_settings/user_settings-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="push_enabled">
                                        { dataFormatter.booleanFormatter(item.push_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="email_enabled">
                                        { dataFormatter.booleanFormatter(item.email_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="sms_enabled">
                                        { dataFormatter.booleanFormatter(item.sms_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="theme_preference">
                                        { item.theme_preference }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="language_preference">
                                        { item.language_preference }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="show_sensitive_content">
                                        { dataFormatter.booleanFormatter(item.show_sensitive_content) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="allow_message_requests">
                                        { dataFormatter.booleanFormatter(item.allow_message_requests) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="read_receipts_enabled">
                                        { dataFormatter.booleanFormatter(item.read_receipts_enabled) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="activity_status_visible">
                                        { dataFormatter.booleanFormatter(item.activity_status_visible) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.user_settings_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Follows Follower</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>RequestedAt</th>
                                
                                
                                
                                <th>AcceptedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.follows_follower && Array.isArray(users.follows_follower) &&
                              users.follows_follower.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/follows/follows-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requested_at">
                                        { dataFormatter.dateTimeFormatter(item.requested_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="accepted_at">
                                        { dataFormatter.dateTimeFormatter(item.accepted_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.follows_follower?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                <>
                    <p className={'block font-bold mb-2'}>Follows Following</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>RequestedAt</th>
                                
                                
                                
                                <th>AcceptedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.follows_following && Array.isArray(users.follows_following) &&
                              users.follows_following.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/follows/follows-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="requested_at">
                                        { dataFormatter.dateTimeFormatter(item.requested_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="accepted_at">
                                        { dataFormatter.dateTimeFormatter(item.accepted_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.follows_following?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>Media_assets Owner</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>AssetType</th>
                                
                                
                                
                                
                                
                                
                                
                                <th>MIMEType</th>
                                
                                
                                
                                <th>SizeBytes</th>
                                
                                
                                
                                <th>WidthPx</th>
                                
                                
                                
                                <th>HeightPx</th>
                                
                                
                                
                                <th>DurationSeconds</th>
                                
                                
                                
                                <th>StorageKey</th>
                                
                                
                                
                                <th>Checksum</th>
                                
                                
                                
                                <th>UploadedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.media_assets_owner && Array.isArray(users.media_assets_owner) &&
                              users.media_assets_owner.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/media_assets/media_assets-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="asset_type">
                                        { item.asset_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="mime_type">
                                        { item.mime_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="size_bytes">
                                        { item.size_bytes }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="width_px">
                                        { item.width_px }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="height_px">
                                        { item.height_px }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="duration_seconds">
                                        { item.duration_seconds }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="storage_key">
                                        { item.storage_key }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="checksum_text">
                                        { item.checksum_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="uploaded_at">
                                        { dataFormatter.dateTimeFormatter(item.uploaded_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.media_assets_owner?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Live_streams Host</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>Visibility</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>ScheduledAt</th>
                                
                                
                                
                                <th>StartedAt</th>
                                
                                
                                
                                <th>EndedAt</th>
                                
                                
                                
                                <th>StreamKey</th>
                                
                                
                                
                                <th>PlaybackURL</th>
                                
                                
                                
                                
                                
                                <th>PeakViewers</th>
                                
                                
                                
                                <th>TotalViews</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.live_streams_host && Array.isArray(users.live_streams_host) &&
                              users.live_streams_host.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/live_streams/live_streams-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="title_text">
                                        { item.title_text }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="visibility">
                                        { item.visibility }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="scheduled_at">
                                        { dataFormatter.dateTimeFormatter(item.scheduled_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="started_at">
                                        { dataFormatter.dateTimeFormatter(item.started_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="ended_at">
                                        { dataFormatter.dateTimeFormatter(item.ended_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="stream_key">
                                        { item.stream_key }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="playback_url">
                                        { item.playback_url }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="peak_viewers">
                                        { item.peak_viewers }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="total_views">
                                        { item.total_views }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.live_streams_host?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Transactions User</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>TransactionType</th>
                                
                                
                                
                                <th>Amount</th>
                                
                                
                                
                                <th>CurrencyCode</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                <th>ProviderName</th>
                                
                                
                                
                                <th>ProviderReference</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>InitiatedAt</th>
                                
                                
                                
                                <th>CompletedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.transactions_user && Array.isArray(users.transactions_user) &&
                              users.transactions_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/transactions/transactions-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="transaction_type">
                                        { item.transaction_type }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="amount">
                                        { item.amount }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="currency_code">
                                        { item.currency_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="provider_name">
                                        { item.provider_name }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="provider_reference">
                                        { item.provider_reference }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="initiated_at">
                                        { dataFormatter.dateTimeFormatter(item.initiated_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="completed_at">
                                        { dataFormatter.dateTimeFormatter(item.completed_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.transactions_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Ai_recommendations User</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>RecommendationType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Score</th>
                                
                                
                                
                                <th>Reason</th>
                                
                                
                                
                                <th>GeneratedAt</th>
                                
                                
                                
                                <th>ExpiresAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.ai_recommendations_user && Array.isArray(users.ai_recommendations_user) &&
                              users.ai_recommendations_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/ai_recommendations/ai_recommendations-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="recommendation_type">
                                        { item.recommendation_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="score">
                                        { item.score }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="reason_text">
                                        { item.reason_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="generated_at">
                                        { dataFormatter.dateTimeFormatter(item.generated_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="expires_at">
                                        { dataFormatter.dateTimeFormatter(item.expires_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.ai_recommendations_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                <>
                    <p className={'block font-bold mb-2'}>Ai_recommendations SuggestedUser</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>RecommendationType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Score</th>
                                
                                
                                
                                <th>Reason</th>
                                
                                
                                
                                <th>GeneratedAt</th>
                                
                                
                                
                                <th>ExpiresAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.ai_recommendations_suggested_user && Array.isArray(users.ai_recommendations_suggested_user) &&
                              users.ai_recommendations_suggested_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/ai_recommendations/ai_recommendations-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="recommendation_type">
                                        { item.recommendation_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="score">
                                        { item.score }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="reason_text">
                                        { item.reason_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="generated_at">
                                        { dataFormatter.dateTimeFormatter(item.generated_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="expires_at">
                                        { dataFormatter.dateTimeFormatter(item.expires_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.ai_recommendations_suggested_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                <>
                    <p className={'block font-bold mb-2'}>Content_moderation_reports Reporter</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>TargetType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Reason</th>
                                
                                
                                
                                <th>Details</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>ReportedAt</th>
                                
                                
                                
                                <th>ResolvedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.content_moderation_reports_reporter && Array.isArray(users.content_moderation_reports_reporter) &&
                              users.content_moderation_reports_reporter.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/content_moderation_reports/content_moderation_reports-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="target_type">
                                        { item.target_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reason_code">
                                        { item.reason_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="details_text">
                                        { item.details_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reported_at">
                                        { dataFormatter.dateTimeFormatter(item.reported_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="resolved_at">
                                        { dataFormatter.dateTimeFormatter(item.resolved_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.content_moderation_reports_reporter?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                <>
                    <p className={'block font-bold mb-2'}>Content_moderation_reports ReportedUser</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>TargetType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Reason</th>
                                
                                
                                
                                <th>Details</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>ReportedAt</th>
                                
                                
                                
                                <th>ResolvedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.content_moderation_reports_reported_user && Array.isArray(users.content_moderation_reports_reported_user) &&
                              users.content_moderation_reports_reported_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/content_moderation_reports/content_moderation_reports-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="target_type">
                                        { item.target_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reason_code">
                                        { item.reason_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="details_text">
                                        { item.details_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reported_at">
                                        { dataFormatter.dateTimeFormatter(item.reported_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="resolved_at">
                                        { dataFormatter.dateTimeFormatter(item.resolved_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.content_moderation_reports_reported_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                <>
                    <p className={'block font-bold mb-2'}>Content_moderation_reports AssignedModerator</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                <th>TargetType</th>
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <th>Reason</th>
                                
                                
                                
                                <th>Details</th>
                                
                                
                                
                                <th>Status</th>
                                
                                
                                
                                
                                
                                <th>ReportedAt</th>
                                
                                
                                
                                <th>ResolvedAt</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.content_moderation_reports_assigned_moderator && Array.isArray(users.content_moderation_reports_assigned_moderator) &&
                              users.content_moderation_reports_assigned_moderator.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/content_moderation_reports/content_moderation_reports-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    <td data-label="target_type">
                                        { item.target_type }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reason_code">
                                        { item.reason_code }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="details_text">
                                        { item.details_text }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="status">
                                        { item.status }
                                    </td>
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="reported_at">
                                        { dataFormatter.dateTimeFormatter(item.reported_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="resolved_at">
                                        { dataFormatter.dateTimeFormatter(item.resolved_at) }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.content_moderation_reports_assigned_moderator?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                
                
                <>
                    <p className={'block font-bold mb-2'}>User_badges User</p>
                    <CardBox
                      className='mb-6 border border-gray-300 rounded overflow-hidden'
                      hasTable
                    >
                        <div className='overflow-x-auto'>
                            <table>
                            <thead>
                            <tr>
                                
                                
                                
                                
                                
                                
                                <th>AwardedAt</th>
                                
                                
                                
                                <th>AwardReason</th>
                                
                                
                            </tr>
                            </thead>
                            <tbody>
                            {users.user_badges_user && Array.isArray(users.user_badges_user) &&
                              users.user_badges_user.map((item: any) => (
                                <tr key={item.id} onClick={() => router.push(`/user_badges/user_badges-view/?id=${item.id}`)}>
                                    
                                    
                                    
                                    
                                    
                                    
                                    <td data-label="awarded_at">
                                        { dataFormatter.dateTimeFormatter(item.awarded_at) }
                                    </td>
                                    
                                    
                                    
                                    <td data-label="award_reason">
                                        { item.award_reason }
                                    </td>
                                    
                                    
                                </tr>
                              ))}
                            </tbody>
                        </table>
                        </div>
                        {!users?.user_badges_user?.length && <div className={'text-center py-4'}>No data</div>}
                    </CardBox>
                </>
                
                

                <BaseDivider />

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

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

export default UsersView;