

<?php $__env->startSection('title', 'Edit Salary Component'); ?>
<?php $__env->startSection('heading', 'Edit Salary Component'); ?>

<?php $__env->startSection('content'); ?>
    <?php if (isset($component)) { $__componentOriginal53747ceb358d30c0105769f8471417f6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal53747ceb358d30c0105769f8471417f6 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.card','data' => ['class' => 'max-w-3xl']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('card'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'max-w-3xl']); ?>
        <form action="<?php echo e(route('salary-components.update', $salaryComponent)); ?>" method="POST" class="space-y-6" novalidate data-salary-component-form="edit">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>
            <div class="grid gap-4 sm:grid-cols-2">
                <div>
                    <label class="block text-sm font-medium text-slate-700">Name <span class="text-red-500">*</span></label>
                    <input type="text" name="name" value="<?php echo e(old('name', $salaryComponent->name)); ?>" class="mt-1 block w-full rounded-lg border border-slate-300 px-3 py-2" placeholder="e.g. Basic Salary">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-sm text-red-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    <p data-js-error="name" class="mt-1 text-sm text-red-600 hidden"></p>
                </div>
                <div>
                    <label class="block text-sm font-medium text-slate-700">Type</label>
                    <select name="type" class="mt-1 block w-full rounded-lg border border-slate-300 px-3 py-2 js-select2" required>
                        <option value="earning" <?php echo e(old('type', $salaryComponent->type) === 'earning' ? 'selected' : ''); ?>>Earning</option>
                        <option value="deduction" <?php echo e(old('type', $salaryComponent->type) === 'deduction' ? 'selected' : ''); ?>>Deduction</option>
                    </select>
                </div>
                <div>
                    <label class="block text-sm font-medium text-slate-700">Value Type</label>
                    <select name="value_type" class="mt-1 block w-full rounded-lg border border-slate-300 px-3 py-2 js-select2">
                        <option value="fixed" <?php echo e(old('value_type', $salaryComponent->value_type) === 'fixed' ? 'selected' : ''); ?>>Fixed</option>
                        <option value="variable" <?php echo e(old('value_type', $salaryComponent->value_type) === 'variable' ? 'selected' : ''); ?>>Variable</option>
                        <option value="basic_percent" <?php echo e(old('value_type', $salaryComponent->value_type) === 'basic_percent' ? 'selected' : ''); ?>>Basic Percent</option>
                        <option value="ctc_percent" <?php echo e(old('value_type', $salaryComponent->value_type) === 'ctc_percent' ? 'selected' : ''); ?>>CTC Percent</option>
                        <option value="balancing_ctc" <?php echo e(old('value_type', $salaryComponent->value_type) === 'balancing_ctc' ? 'selected' : ''); ?>>Balancing Amount of CTC</option>
                        <option value="system_calculated" <?php echo e(old('value_type', $salaryComponent->value_type) === 'system_calculated' ? 'selected' : ''); ?>>System Calculated</option>
                    </select>
                </div>
                <div>
                    <label class="block text-sm font-medium text-slate-700">Default Amount</label>
                    <input type="number" name="default_amount" value="<?php echo e(old('default_amount', $salaryComponent->default_amount)); ?>" step="0.01" min="0" class="mt-1 block w-full rounded-lg border border-slate-300 px-3 py-2" required>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['default_amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><p class="mt-1 text-sm text-red-600"><?php echo e($message); ?></p><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
                <div class="sm:col-span-2 flex items-center gap-2">
                    <input type="hidden" name="is_taxable" value="0">
                    <input type="checkbox" name="is_taxable" value="1" id="is_taxable" <?php echo e(old('is_taxable', $salaryComponent->is_taxable) ? 'checked' : ''); ?> class="rounded border-slate-300">
                    <label for="is_taxable" class="text-sm font-medium text-slate-700">Taxable</label>
                </div>
            </div>
            <div class="flex gap-2">
                <?php if (isset($component)) { $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.button','data' => ['type' => 'submit','variant' => 'primary']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'submit','variant' => 'primary']); ?>Update <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $attributes = $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $component = $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
                <a href="<?php echo e(route('salary-components.index')); ?>" class="inline-flex items-center rounded-lg bg-slate-100 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-200">Cancel</a>
            </div>
        </form>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $attributes = $__attributesOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__attributesOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal53747ceb358d30c0105769f8471417f6)): ?>
<?php $component = $__componentOriginal53747ceb358d30c0105769f8471417f6; ?>
<?php unset($__componentOriginal53747ceb358d30c0105769f8471417f6); ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script src="<?php echo e(asset('js/form-validation.js')); ?>"></script>
<script src="<?php echo e(asset('js/form-text-rules.js')); ?>"></script>
<script src="<?php echo e(asset('js/salary-component-form-validation.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/kiyohr/v2_version/resources/views/salary-components/edit.blade.php ENDPATH**/ ?>