<?php $__env->startSection('title', 'Service Details'); ?>
<?php $__env->startSection('breadcrumb', 'Services / Details'); ?>

<?php $__env->startSection('content'); ?>
<div class="max-w-4xl">
    <div class="bg-white rounded-xl shadow-sm border border-slate-200 p-6 mb-4">
        <div class="flex items-start justify-between gap-4">
            <div>
                <h1 class="text-xl font-semibold text-slate-800"><?php echo e($service->name); ?></h1>
                <p class="text-sm text-slate-500 mt-1">Code: <?php echo e($service->service_code); ?></p>
                <p class="text-sm text-slate-500 mt-1">Category: <?php echo e($service->category?->name ?? '—'); ?></p>
            </div>
            <div class="text-right">
                <p class="text-2xl font-bold text-slate-800">₹<?php echo e(number_format($service->price, 2)); ?></p>
                <p class="text-sm text-slate-500"><?php echo e($service->duration_minutes); ?> min <?php if($service->buffer_minutes): ?> + <?php echo e($service->buffer_minutes); ?> min buffer <?php endif; ?></p>
                <p class="mt-1">
                    <span class="px-2 py-1 text-xs font-medium rounded-full <?php echo e($service->status === 'active' ? 'bg-green-100 text-green-800' : 'bg-slate-100 text-slate-800'); ?>"><?php echo e($service->status); ?></span>
                </p>
            </div>
        </div>
        <?php if($service->description): ?>
        <p class="mt-4 text-sm text-slate-700"><?php echo e($service->description); ?></p>
        <?php endif; ?>
        <div class="mt-4 flex flex-wrap gap-3 text-xs text-slate-600">
            <span class="px-2 py-1 rounded-full bg-slate-100">Gender: <?php echo e(ucfirst($service->gender_applicability)); ?></span>
            <?php if($service->online_booking_enabled): ?>
                <span class="px-2 py-1 rounded-full bg-emerald-100 text-emerald-800">Online booking enabled</span>
            <?php endif; ?>
            <?php if($service->tax_percentage): ?>
                <span class="px-2 py-1 rounded-full bg-slate-100">Tax: <?php echo e($service->tax_percentage); ?>%</span>
            <?php endif; ?>
        </div>
        <div class="mt-4 flex gap-3">
            <a href="<?php echo e(route('services.edit', $service)); ?>" class="px-4 py-2 bg-slate-800 text-white text-sm font-medium rounded-lg hover:bg-slate-700">Edit</a>
            <a href="<?php echo e(route('services.index')); ?>" class="px-4 py-2 bg-slate-200 rounded-lg text-sm">Back to list</a>
        </div>
    </div>

    <div class="bg-white rounded-xl shadow-sm border border-slate-200 p-6">
        <h2 class="text-lg font-semibold text-slate-800 mb-3">Staff who can perform this service</h2>
        <?php
            $staff = $service->staff;
        ?>
        <?php if($staff->isEmpty()): ?>
            <p class="text-sm text-slate-500">No staff have been assigned to this service yet.</p>
        <?php else: ?>
            <ul class="divide-y divide-slate-200 text-sm">
                <?php $__currentLoopData = $staff; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $s): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li class="py-2 flex items-center justify-between">
                    <div>
                        <p class="text-slate-800"><?php echo e($s->full_name); ?></p>
                        <p class="text-slate-500"><?php echo e($s->designation ?? ''); ?></p>
                    </div>
                    <p class="text-xs text-slate-500"><?php echo e($s->branch?->name ?? ''); ?></p>
                </li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        <?php endif; ?>
    </div>
</div>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\xampp\htdocs\salon\resources\views/services/show.blade.php ENDPATH**/ ?>