@extends('layouts.app')

@section('title', 'Customer Details')

@section('content')

<div class="row">

    <div class="col-lg-12">

        <div class="d-flex align-items-center justify-content-between mb-4">

            <div>
                <h4 class="mb-2">Customer Details</h4>
                <p class="mb-0">View customer information.</p>
            </div>

            <a href="{{ route('customer.list') }}" class="btn btn-secondary">
                <i class="ri-arrow-left-line mr-1"></i>
                Back
            </a>

        </div>

    </div>


    <div class="col-lg-12">

        <div class="card">

            <div class="card-header">
                <h4 class="card-title">
                    {{ $customer->customer_name }}
                </h4>
            </div>

            <div class="card-body">

                <div class="row">

                    <div class="col-md-6 mb-3">
                        <strong>Customer Name:</strong>
                        <p>{{ $customer->customer_name }}</p>
                    </div>

                    <div class="col-md-6 mb-3">
                        <strong>Phone Number:</strong>
                        <p>{{ $customer->customer_phonenum }}</p>
                    </div>

                    <div class="col-md-6 mb-3">
                        <strong>Shop Name:</strong>
                        <p>{{ $customer->shop_name }}</p>
                    </div>

                    <div class="col-md-6 mb-3">
                        <strong>Area:</strong>
                        <p>
                            {{ $customer->area?->area_name ?? 'N/A' }}
                        </p>
                    </div>

                </div>

            </div>

        </div>

    </div>

</div>

@endsection