@extends('layouts.admin')

@section('content')
    <div class="card shadow mb-4" xmlns="http://www.w3.org/1999/html">
        <div class="card-header py-3 d-flex">
            <h6 class="m-0 font-weight-bold text-success">
                {{ $userAddress->title }}
            </h6>
            <div class="ml-auto">
                <a href="{{ route('admin.user_addresses.index') }}" class="btn btn-success">
                    <span class="text">Back to User Addresses</span>
                </a>
            </div>
        </div>

        <div class="card-body">
            <div class="row">
                <div class="col-lg-6">
                    <div class="form-group">
                        <strong>{{__("Adress Title")}} :</strong>
                        <td>{{ $userAddress->title ?? "-" }}</td>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Is default?")}} :</strong>
                        <span>{{ yesNo($userAddress->default) }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("First Name")}} :</strong>
                        <td>{{ $userAddress->first_name ?? "--" }}</td>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Last Name")}} :</strong>
                        <span>{{ $userAddress->last_name ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Email")}} :</strong>
                        <span>{{ $userAddress->email ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Phone")}} :</strong>
                        <span>{{ $userAddress->phone ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Adress")}} :</strong>
                        <span>{{ $userAddress->address ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Adress2")}} :</strong>
                        <span>{{ $userAddress->address2 ?? "--" }}</span>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="form-group">
                        <strong>{{__("Country")}} :</strong>
                        <td>{{ $userAddress->country->name ?? "-" }}</td>
                    </div>
                    <div class="form-group">
                        <strong>{{__("State")}} :</strong>
                        <span>{{ $userAddress->state->name ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("City")}} :</strong>
                        <span>{{ $userAddress->city->name ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Zip Code")}} :</strong>
                        <span>{{ $userAddress->zip_code ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Po Box")}} :</strong>
                        <span>{{ $userAddress->po_box ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Customer")}} :</strong>
                        <span>{{ $userAddress->user->fullName ?? "--" }}</span>
                    </div>
                    <div class="form-group">
                        <strong>{{__("Created At")}} :</strong>
                        <span>{{ format_date($userAddress->created_at,__("d-m-Y H:i:s")) }}</span>
                    </div>
                </div>
            </div>
        </div>

    </div>
@endsection
