<?php $__env->startSection('title', 'Add Machine'); ?>

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

<!-- Page Heading -->
<?php if (isset($component)) { $__componentOriginal4743781065990dfe96029737c4f06097 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal4743781065990dfe96029737c4f06097 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.layout.page-header','data' => ['title' => 'UEPL | Add Machine','icon' => 'cogs','iconColor' => 'warning']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('layout.page-header'); ?>
<?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(['title' => 'UEPL | Add Machine','icon' => 'cogs','iconColor' => 'warning']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal4743781065990dfe96029737c4f06097)): ?>
<?php $attributes = $__attributesOriginal4743781065990dfe96029737c4f06097; ?>
<?php unset($__attributesOriginal4743781065990dfe96029737c4f06097); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal4743781065990dfe96029737c4f06097)): ?>
<?php $component = $__componentOriginal4743781065990dfe96029737c4f06097; ?>
<?php unset($__componentOriginal4743781065990dfe96029737c4f06097); ?>
<?php endif; ?>

<!-- Alerts -->
<?php if(session('success')): ?>
    <div class="alert alert-success alert-dismissible fade show" role="alert">
        <i class="fas fa-check-circle mr-2"></i><?php echo e(session('success')); ?>

        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
<?php endif; ?>
<?php if(session('error')): ?>
    <div class="alert alert-danger alert-dismissible fade show" role="alert">
        <i class="fas fa-exclamation-circle mr-2"></i><?php echo e(session('error')); ?>

        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
<?php endif; ?>
<?php if($errors->any()): ?>
    <div class="alert alert-danger alert-dismissible fade show" role="alert">
        <i class="fas fa-exclamation-circle mr-2"></i>
        <ul class="mb-0 d-inline-block">
            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li><?php echo e($error); ?></li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
<?php endif; ?>

<!-- Machine Form Card -->
<div class="card shadow mb-4">
    <div class="card-header py-3 d-flex justify-content-between align-items-center" style="background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);">
        <h6 class="m-0 font-weight-bold text-white">
            <i class="fas fa-cogs mr-2"></i> Machine Details Form
        </h6>
        <a href="<?php echo e(route('superadmin.machine.machinedetails')); ?>" class="btn btn-light btn-sm">
            <i class="fas fa-arrow-left mr-1"></i> Back to List
        </a>
    </div>
    <div class="card-body">
        <form id="machineForm" method="POST" action="<?php echo e(route('superadmin.machine.store')); ?>">
            <?php echo csrf_field(); ?>
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Machine ID <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" id="machine_id" name="machine_id" value="<?php echo e(old('machine_id')); ?>" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Machine Name</label>
                    <input type="text" class="form-control" id="machine_name" name="machine_name" value="<?php echo e(old('machine_name')); ?>">
                </div>
            </div>
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Machine SL No <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" id="machine_sl_no" name="machine_sl_no" value="<?php echo e(old('machine_sl_no')); ?>" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Make</label>
                    <input type="text" class="form-control" id="make" name="make" value="<?php echo e(old('make')); ?>">
                </div>
            </div>
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Model Type</label>
                    <input type="text" class="form-control" id="model_type" name="model_type" value="<?php echo e(old('model_type')); ?>">
                </div>
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Diameter (mm) <span class="text-danger">*</span></label>
                    <input type="number" class="form-control" id="diameter" name="diameter" step="0.01" value="<?php echo e(old('diameter')); ?>" required>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Length (m) <span class="text-danger">*</span></label>
                    <input type="number" class="form-control" id="length" name="length" step="0.01" value="<?php echo e(old('length')); ?>" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="small font-weight-bold">Weight (kg) <span class="text-danger">*</span></label>
                    <input type="number" class="form-control" id="weight" name="weight" step="0.01" value="<?php echo e(old('weight')); ?>" required>
                </div>
            </div>
            <div class="row">
                <div class="col-12 mb-3">
                    <label class="small font-weight-bold">Remarks</label>
                    <textarea class="form-control" id="remarks" name="remarks" rows="3" placeholder="Optional remarks..."><?php echo e(old('remarks')); ?></textarea>
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <hr>
                    <button class="btn btn-primary btn-sm" type="submit">
                        <i class="fa fa-save mr-1"></i> Save Machine
                    </button>
                    <button class="btn btn-secondary btn-sm" type="reset">
                        <i class="fa fa-undo mr-1"></i> Reset
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>

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

<?php echo $__env->make('layouts.dashboard.superadminapp', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Admin\Desktop\ip.co.in\resources\views/superadmin/machine/addmachine.blade.php ENDPATH**/ ?>