<?php $__env->startSection('title', 'Edit ' . $client->display_name); ?>
<?php $__env->startSection('page-title', 'Edit Client'); ?>

<?php $__env->startSection('content'); ?>

<div class="d-flex align-items-center gap-3 mb-4">
    <a href="<?php echo e(route('clients.show', $client)); ?>" class="btn btn-sm btn-light"><i class="bi bi-arrow-left"></i></a>
    <h5 class="fw-700 mb-0" style="color:#1e293b;">Edit <?php echo e($client->display_name); ?></h5>
</div>

<div class="row justify-content-center">
<div class="col-lg-7">
<div class="card table-card p-4">

    <?php if($errors->any()): ?>
        <div class="alert alert-danger rounded-3 small py-2 mb-3">
            <i class="bi bi-exclamation-circle me-1"></i> <?php echo e($errors->first()); ?>

        </div>
    <?php endif; ?>

    <form method="POST" action="<?php echo e(route('clients.update', $client)); ?>" novalidate>
    <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?>

    <div class="row g-3">
        <div class="col-sm-6">
            <label class="form-label fw-500">Contact Name <span class="text-danger">*</span></label>
            <input type="text" name="name" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   value="<?php echo e(old('name', $client->name)); ?>" required>
        </div>
        <div class="col-sm-6">
            <label class="form-label fw-500">Business Name</label>
            <input type="text" name="business_name" class="form-control"
                   value="<?php echo e(old('business_name', $client->business_name)); ?>">
        </div>
        <div class="col-sm-6">
            <label class="form-label fw-500">Email Address</label>
            <input type="email" name="email" class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   value="<?php echo e(old('email', $client->email)); ?>">
        </div>
        <div class="col-sm-6">
            <label class="form-label fw-500">Phone Number</label>
            <input type="tel" name="phone" class="form-control"
                   value="<?php echo e(old('phone', $client->phone)); ?>">
        </div>
        <div class="col-12">
            <label class="form-label fw-500">Address</label>
            <textarea name="address" rows="2" class="form-control"><?php echo e(old('address', $client->address)); ?></textarea>
        </div>
    </div>

    <div class="d-flex gap-2 mt-4">
        <button type="submit" class="btn fw-600" style="background:#00a651;color:white;">
            <i class="bi bi-check-lg me-2"></i>Save Changes
        </button>
        <a href="<?php echo e(route('clients.show', $client)); ?>" class="btn btn-outline-secondary fw-600">Cancel</a>
    </div>

    </form>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Bunmi\Desktop\crud\resources\views/clients/edit.blade.php ENDPATH**/ ?>