<div class="livestock-item p-4 border border-gray-200 rounded-lg relative">
    <button type="button" class="remove-livestock absolute top-2 right-2 text-gray-400 hover:text-red-500">
        <i class="fas fa-times-circle"></i>
    </button>
    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
        <div class="space-y-2">
            <label for="livestocks_<?php echo e($index); ?>_type" class="text-sm font-semibold text-gray-700">Jenis Ternak</label>
            <input type="text" name="livestocks[<?php echo e($index); ?>][type]" id="livestocks_<?php echo e($index); ?>_type" value="<?php echo e(old('livestocks.' . $index . '.type', $livestock['type'] ?? '')); ?>"
                class="w-full px-4 py-2 border border-gray-200 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition"
                placeholder="Contoh: Kambing, Sapi">
        </div>
        <div class="space-y-2">
            <label for="livestocks_<?php echo e($index); ?>_male_count" class="text-sm font-semibold text-gray-700">Jumlah Jantan</label>
            <input type="number" name="livestocks[<?php echo e($index); ?>][male_count]" id="livestocks_<?php echo e($index); ?>_male_count" value="<?php echo e(old('livestocks.' . $index . '.male_count', $livestock['male_count'] ?? '')); ?>"
                class="w-full px-4 py-2 border border-gray-200 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition"
                placeholder="Jumlah ternak jantan">
        </div>
        <div class="space-y-2">
            <label for="livestocks_<?php echo e($index); ?>_female_count" class="text-sm font-semibold text-gray-700">Jumlah Betina</label>
            <input type="number" name="livestocks[<?php echo e($index); ?>][female_count]" id="livestocks_<?php echo e($index); ?>_female_count" value="<?php echo e(old('livestocks.' . $index . '.female_count', $livestock['female_count'] ?? '')); ?>"
                class="w-full px-4 py-2 border border-gray-200 rounded-lg focus:ring-2 focus:ring-primary/20 focus:border-primary outline-none transition"
                placeholder="Jumlah ternak betina">
        </div>
    </div>
    <?php if(isset($livestock->id)): ?>
        <input type="hidden" name="livestocks[<?php echo e($index); ?>][id]" value="<?php echo e($livestock->id); ?>">
    <?php endif; ?>
</div><?php /**PATH /home/sumba001/public_html/pom500.sumbatengahkab.go.id/resources/views/beneficiaries/partials/livestock_input.blade.php ENDPATH**/ ?>