<?php $__env->startSection('heading', 'Addons'); ?>
<?php $__env->startSection('subheading', 'Extra services staff can attach to a garment — buttons, embroidery, lining etc.'); ?>

<?php $__env->startSection('actions'); ?>
  <a href="<?php echo e(route('shop.addons.create')); ?>" class="px-4 py-2 rounded-lg text-sm font-medium text-white" style="background:#C2185B;">+ New addon</a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<?php echo $__env->make('partials.master-tabs', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php if(session('status')): ?>
  <div class="mb-4 text-sm rounded-lg px-4 py-3" style="background:#E1F5EE; color:#0F6E56;">
    <?php echo e(session('status')); ?>

  </div>
<?php endif; ?>

<div class="card p-6">
  <table class="w-full text-sm">
    <thead>
      <tr class="text-left" style="color:#a19a8f;">
        <th class="pb-3 font-medium text-xs">Name</th>
        <th class="pb-3 font-medium text-xs">Applies to</th>
        <th class="pb-3 font-medium text-xs text-right">Price</th>
        <th class="pb-3 font-medium text-xs">Status</th>
        <th class="pb-3 font-medium text-xs text-right">Actions</th>
      </tr>
    </thead>
    <tbody style="color:#1A1625;">
      <?php $__empty_1 = true; $__currentLoopData = $addons; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $addon): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <tr class="border-t" style="border-color:#f2ece0;">
          <td class="py-3 font-medium"><?php echo e($addon->name); ?> <?php if($addon->name_ta): ?> <span class="font-normal" style="color:#6b6470;">/ <?php echo e($addon->name_ta); ?></span> <?php endif; ?></td>
          <td class="py-3 text-xs" style="color:#6b6470;"><?php echo e($addon->garmentTypes->pluck('name')->join(', ') ?: '—'); ?></td>
          <td class="py-3 text-right">₹<?php echo e(number_format($addon->price, 0)); ?></td>
          <td class="py-3">
            <?php if($addon->is_active): ?>
              <span class="text-xs px-2 py-1 rounded-full" style="background:#E1F5EE; color:#0F6E56;">Active</span>
            <?php else: ?>
              <span class="text-xs px-2 py-1 rounded-full" style="background:#FCEBEB; color:#791F1F;">Inactive</span>
            <?php endif; ?>
          </td>
          <td class="py-3 text-right">
            <a href="<?php echo e(route('shop.addons.edit', $addon)); ?>" class="text-xs font-medium" style="color:#5E35B1;">Edit</a>
            <form method="POST" action="<?php echo e(route('shop.addons.destroy', $addon)); ?>" class="inline" onsubmit="return confirm('Remove this addon?');">
              <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
              <button type="submit" class="text-xs font-medium ml-3" style="color:#C2185B;">Delete</button>
            </form>
          </td>
        </tr>
      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <tr><td colspan="5" class="py-6 text-center text-sm" style="color:#a19a8f;">No addons yet.</td></tr>
      <?php endif; ?>
    </tbody>
  </table>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH F:\xampp\htdocs\etailorz-v2\resources\views/admin/addons/index.blade.php ENDPATH**/ ?>