@extends('layouts.app')
@push('title')
    {{ $pageTitle }}
@endpush
@section('content')
    <!-- Page Content Wrapper Start -->
    <div class="page-content-wrapper bda-pb-100 bda-pt-30 bda-px-18 ">
        <div class="bda-mb-30">
            <!-- breadcrumb  -->
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb bda-breadcrumb">
                    <li class="breadcrumb-item "><a href="{{route('admin.users.index')}}"class="title-light">{{$previousBreadcrumb}}</a></li>
                    <li class="breadcrumb-item ">{{$breadcrumb}}</li>
                </ol>
            </nav>
        </div>

        <!-- data table area start -->
        <div class="bda-table-data overflow-x-auto">
            <div class="bda-card-area-box bda-w-500">
                <div class="bda-card-box">
                    <div class="table-responsive">
                        <table class="table bda-data-table-box" id="userView">
                            <div class="bda-mb-10 d-flex justify-content-between">
                                <div class="user-picture">
                                    <img src="{{getImageUrl($user?->picture)}}" class="img-fluid"
                                         alt="{{__('User Picture')}}">
                                </div>
                            </div>
                            <thead>
                            <tr>
                                <th class="text-start">{{__('Name')}}</th>
                                <td>{{$user?->name ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Email')}}</th>
                                <td>{{$user?->email ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Phone')}}</th>
                                <td>{{$user?->phone ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Date of Birth')}}</th>
                                <td>{{$user?->dob ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Gender')}}</th>
                                <td>{{$user?->gender == MALE ? __('Male') : ($user?->gender == FEMALE ? __('Female') : __('N/A'))}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('City')}}</th>
                                <td>{{$user?->city ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('State')}}</th>
                                <td>{{$user?->state ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Zip')}}</th>
                                <td>{{$user?->zip ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Country ')}}</th>
                                <td>{{$user?->country  ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Address')}}</th>
                                <td>{{$user?->address   ?? __('N/A')}}</td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Status')}}</th>
                                <td>
                                    @if ($user->status == USER_STATUS_ACTIVE)
                                        <div class="success bda-gab-10 d-flex align-items-center">
                                            <img src="{{getImageUrl('assets/images/icon/resolved.svg')}}"
                                                 alt="{{__('Active')}}">
                                            {{__('Active')}}
                                        </div>
                                    @elseif($user->status == USER_STATUS_INACTIVE)
                                        <div class="placeholder-color bda-gab-10 d-flex align-items-center">
                                            <img src="{{getImageUrl('assets/images/icon/Close.svg')}}"
                                                 alt="{{__('Inactive')}}">
                                            {{__('Inactive')}}
                                        </div>
                                    @elseif($user->status == USER_STATUS_PENDING)
                                        <div class="warning bda-gab-10 d-flex align-items-center">
                                            <img src="{{getImageUrl('assets/images/icon/pending.svg')}}"
                                                 alt="{{__('Pending')}}">
                                            {{__('Pending')}}
                                        </div>
                                    @endif
                                </td>
                            </tr>
                            <tr>
                                <th class="text-start">{{__('Created At  ')}}</th>
                                <td>{{$user?->created_at ? $user->created_at->format('Y-m-d') : __('N/A')}}</td>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>

            </div>
        </div>
        <!-- data table area end -->
    </div>
    <!-- Page Content Wrapper End -->
@endsection

@push('script')
    <script src="{{ asset('assets/js/custom/admin/user.js') }}"></script>
@endpush
