

<?php $__env->startSection('content'); ?>
<h2>Crear Empresa</h2>

<form action="<?php echo e(route('superadmin.empresas.store')); ?>" method="POST" enctype="multipart/form-data">
    <?php echo csrf_field(); ?>

    <div class="mb-3">
        <label class="form-label">Nombre</label>
        <input type="text" name="nombre" class="form-control" required>
    </div>

    <div class="mb-3">
        <label class="form-label">RUT</label>
        <input type="text" name="rut" class="form-control" required>
    </div>

    <div class="mb-3">
        <label class="form-label">Teléfono</label>
        <input type="text" name="telefono" class="form-control">
    </div>

    <div class="mb-3">
        <label class="form-label">Email de contacto</label>
        <input type="email" name="email_contacto" class="form-control">
    </div>

    <div class="mb-3">
        <label class="form-label">Estado</label>
        <select name="estado" class="form-select">
            <option value="activo">Activo</option>
            <option value="inactivo">Inactivo</option>
        </select>
    </div>

    <div class="mb-3">
        <label class="form-label">Logo</label>
        <input type="file" name="logo" class="form-control" accept="image/*" onchange="previewLogo(this)">
        <img id="preview" class="mt-2" style="max-height: 100px;">
    </div>

    <button type="submit" class="btn btn-primary">Guardar</button>
</form>

<script>
function previewLogo(input) {
    const preview = document.getElementById('preview');
    if (input.files && input.files[0]) {
        const reader = new FileReader();
        reader.onload = e => preview.src = e.target.result;
        reader.readAsDataURL(input.files[0]);
    }
}
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dashboard', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/ofertasv/public_html/botondepanico/resources/views/superadmin/empresas/create.blade.php ENDPATH**/ ?>