<?php
include "../../root.class.php";
$barcode = new barcodeReader();
$serial_barcode = new serial_scanner();

$index = 1;
$amount = $_GET['amount'];
// var_dump($_GET);
while ($index <= $amount) {
    echo "<div style='width:80vw;border: 2px solid black;border-radius: 2vw;display:flex;column-gap: 2em;padding: 1em;margin-top: 1em;flex-direction: row;flex-wrap: wrap;align-content: center;justify-content: center;align-items: center;'>";
    echo "<div style='width:30vw;display:flex;flex-direction: column;align-content: center;justify-content: flex-start;align-items: stretch;'>";
    echo "<input type='text' class='inputs'onchange='serial_barcode_check(this,$index)' onkeyup='check_blanks(this)' placeholder='Serial Number $index' onchange id='s_n_$index'><br>";
    // echo $serial_barcode->add_button("s_n_$index", $index, $_GET['styles'], "SCAN S/N $index");
    echo "</div>";
    echo "<div style='width:30vw;display:flex;flex-direction: column;align-content: center;justify-content: flex-start;align-items: stretch;'>";
    echo "<input type='text' class='inputs' onchange='serial_barcode_check(this,$index)' onkeyup='check_blanks(this)' placeholder='Barcode $index' id='barcode_$index'><br>";
    // echo $barcode->add_button("barcode_$index", $index, $_GET['styles'], "SCAN BARCODE $index");
    echo "</div>";
    echo "</div>";
    ?>

    <?php
    $index++;
}
echo "<input type='text' class='inputs' hidden id='no_inputs' value='$index'>";
