<template>
  <section id="content">
    <div id="content-header">
      <h1 :class="[darkMode ? 'h1-darkmode' : 'h1-lightmode']" id="page-name">Assets</h1>
    </div>
    <div id="content-body">
      <ClientSearch v-if="onAssetlist || onCustomerAssetlist"/>
      <AssetTable v-if="onAssetlist"/>
      <AssetTableNoClient v-if="onCustomerAssetlist"/>
      <Asset v-if="onAsset"/>
      <HardwareSpecifications v-if="onAsset"/>
      <SoftwareSpecifications v-if="onAsset"/>
      <NetworkSpecifications v-if="onAsset"/>
      <AssetSearch v-if="onSolutionlistAsset"/>
      <AssetSolutionList v-if="onSolutionlistAsset"/>
    </div>
  </section>
</template>
  
  
<script setup>
import { ref } from 'vue';

import ClientSearch from "../components/ClientSearch.vue";
import AssetTable from "../components/server/AssetTable.vue";
import AssetTableNoClient from "../components/server/AssetTableNoClient.vue";
import Asset from "../components/server/Asset.vue";
import HardwareSpecifications from "../components/server/HardwareSpecifications.vue";
import SoftwareSpecifications from "../components/server/SoftwareSpecifications.vue";
import NetworkSpecifications from "../components/server/NetworkSpecifications.vue";
import AssetSearch from "../components/AssetSearch.vue";
import AssetSolutionList from "../components/server/AssetSolutionList.vue";

definePageMeta({
  layout: 'default'
})

const darkMode = ref(true)

// to render the right components
const onAssetlist = ref(true)
const onCustomerAssetlist = ref(false)
const onAsset = ref(false)
const onSolutionlistAsset = ref(false)
</script>

<script>
export default {
  name: "AssetPage",
}
</script>   
    
    
<style scoped>
* {
  box-sizing: border-box;
}


#content {
  display: flex;
  flex-direction: column;
  float: left;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
  flex-grow: 1;
  gap: 0.625rem;
  padding: 0 1.25rem;
}

#content-header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 3.125rem;
}

#page-name {
  letter-spacing: 5%;
  font: 400 1.5rem/125% Overpass, -apple-system, Roboto, Helvetica,
    sans-serif;
  text-decoration: underline;
}

.h1-darkmode {
  color: #fff;
}

.h1-lightmode {
  color: #000;
}

#content-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1.25rem;
  margin-bottom: 0.625rem;
  border-radius: 0.625rem;
}
</style>