<script setup>
import PlantView from "@/views/PlantView.vue";
import ConditionsVIew from "@/views/ConditionsVIew.vue";
import { RouterView } from "vue-router";
import Button from "primevue/button";
import { useRoute } from 'vue-router';
import {computed} from "vue";

const route = useRoute();

const showHomeButton = computed(() => route.path !== '/' && route.path !== '/loading');
</script>

<template>
  <div class="main-wrapper">
    <div class="inner">
      <Button v-if="showHomeButton" icon="pi pi-home" severity="secondary" aria-label="Home" @click="$router.push('/')"/>


      <RouterView></RouterView>
    </div>
  </div>
</template>

<style scoped>

* {
  font-family: Helvetica, sans-serif;
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem;
}

.inner {
  max-width: 45rem;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: end;
}


</style>
