<?php

  $boton = (object) [
    'tipo' => $tipo ?? 'button',
    'atributos' => []
  ];

  if (empty($clases)) {

    $clases = 'btn';

    if ($boton->tipo === 'button')
      $clases = "$clases btn-primary";
    else if ($boton->tipo === 'submit')
      $clases = "$clases btn-success";
    else if ($boton->tipo === 'reset')
      $clases = "$clases btn-warning"
    ;

  }

  $boton->atributos[] = "type=$boton->tipo";

  $boton->atributos[] = 'class="' . $utilidades->limpiar($clases) . '"';

  if (!empty($id))
    $boton->atributos[] = "id=$id"
  ;

  if (!empty($nombre))
    $boton->atributos[] = "name=$nombre";
  else if (!empty($id))
    $boton->atributos[] = "name=$id"
  ;

  if (!empty($valor))
    $boton->atributos[] = "valor=$valor"
  ;

  if (!empty($atributos))
    $boton->atributos[] = $utilidades->limpiar($atributos)
  ;

  $boton->atributos = implode(' ', $boton->atributos);

?>

<button <?php echo $boton->atributos; ?>><?php echo e($slot); ?></button>
<?php /**PATH C:\xampp\htdocs\aplicaciones\empresa\sistemas\daite\resources\views/aplicacion/elementos/boton.blade.php ENDPATH**/ ?>