@{
    ViewData["Title"] = "Crud Inquilino";
}
@{
    Layout = "_Layout";
}

<div class="container">
    <div class="row">
        <div class="col">
            <h3>Inquilinos</h3>
            <table border="1">
                <thead>
                    <tr>
                        <th>Dni</th>
                        <th>Nombre</th>
                        <th>Apellido</th>
                        <th>Dirección</th>
                    </tr>
                </thead>
                <tbody id="inquilino-data" hx-get="/api/inquilino" hx-trigger="load" hx-swap="innerHTML">
                <!-- Los datos serán cargados aquí -->
                </tbody>
            </table>
            <br>

            <div class="btn-group" role="group" aria-label="Basic outlined example">
                <button type="button" class="btn btn-primary" data-bs-toggle="tooltip" data-bs-title="Añadir Inquilino"
                    hx-get="/Inquilino/FormAdd/" hx-target="#addInquilino" hx-swap="innerHTML" >
                Añadir
                </button>

                <button type="button" class="btn btn-primary">Modificar</button>
                <button type="button" class="btn btn-primary">Eliminar</button>
            </div>
            
        </div>

        <div class="col">
            <div id="addInquilino"></div>

        </div>
    </div>
</div>

