<script>
  export let deviceLog;
</script>

<div class="table-wrapper">
  <!-- Tablo başlıkları -->
  <div class="table table-head">
    <div class="table-row">
      <div class="table-head-item">Name</div>
      <div class="table-head-item">Type</div>
      <div class="table-head-item">Manufacturer</div>
      <div class="table-head-item">Serial Number</div>
      <div class="table-head-item">Model</div>
      <div class="table-head-item">Version</div>
      <div class="table-head-item">IP Address</div>
    </div>
    <div class="divider"></div>
  </div>

  <!-- Cihaz bilgileri -->
  <div class="table table-body">
    {#each $deviceLog as log}
      {#if log.sensor_value != undefined}
        <div>{log.sensor_value}</div>
        <div>{log.battery_life}</div>
      {:else}
      <div>door switch</div>
      {/if}
    {/each}
    <div class="divider"></div>
  </div>
</div>

<style>
</style>
