<?php $__env->startSection('title', 'Editar Empresa | Veltrix v2'); ?>

<?php $__env->startSection('content'); ?>
    <div class="container py-4">
        <div class="d-flex justify-content-between align-items-center mb-3 flex-wrap gap-2">
            <h1 class="h4 mb-0">Editar empresa: <?php echo e($empresa->nombre); ?></h1>
            <a href="<?php echo e(route('empresas.index')); ?>" class="btn btn-outline-secondary">Volver</a>
        </div>

        <div class="card border-0 shadow-sm">
            <div class="card-body">
                <form action="<?php echo e(route('empresas.update', $empresa)); ?>" method="POST" class="row g-3">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PUT'); ?>

                    <div class="col-12 col-md-6">
                        <label class="form-label" for="nombre">Nombre</label>
                        <input class="form-control" id="nombre" name="nombre" value="<?php echo e(old('nombre', $empresa->nombre)); ?>" required>
                    </div>
                    <div class="col-12 col-md-6">
                        <label class="form-label" for="slug">Slug</label>
                        <input class="form-control" id="slug" name="slug" value="<?php echo e(old('slug', $empresa->slug)); ?>" required>
                    </div>
                    <div class="col-12 col-md-4">
                        <label class="form-label" for="nit">NIT</label>
                        <input class="form-control" id="nit" name="nit" value="<?php echo e(old('nit', $empresa->nit)); ?>">
                    </div>
                    <div class="col-12 col-md-4">
                        <label class="form-label" for="email">Email</label>
                        <input class="form-control" id="email" name="email" type="email" value="<?php echo e(old('email', $empresa->email)); ?>">
                    </div>
                    <div class="col-12 col-md-4">
                        <label class="form-label" for="telefono">Telefono</label>
                        <input class="form-control" id="telefono" name="telefono" value="<?php echo e(old('telefono', $empresa->telefono)); ?>">
                    </div>
                    <div class="col-12 col-md-8">
                        <label class="form-label" for="direccion">Direccion</label>
                        <input class="form-control" id="direccion" name="direccion" value="<?php echo e(old('direccion', $empresa->direccion)); ?>">
                    </div>
                    <div class="col-12 col-md-4">
                        <label class="form-label" for="estado">Estado</label>
                        <select class="form-select" id="estado" name="estado" required>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = ['activa', 'suspendida', 'bloqueada']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $estado): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                <option value="<?php echo e($estado); ?>" <?php if(old('estado', $empresa->estado) === $estado): echo 'selected'; endif; ?>><?php echo e(ucfirst($estado)); ?></option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        </select>
                    </div>
                    <div class="col-12">
                        <button class="btn btn-primary">Guardar cambios</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/veltrix-v2/resources/views/modules/empresas/edit.blade.php ENDPATH**/ ?>