<template>
  <div class="content">
    <v-header :craneName="craneName" :isShowHomeButton="isShowHomeButton" style="height: 70px;" />
    <router-view style="height: calc(100vh - 70px);" />
  </div>
</template>
  
<script lang="ts" setup>
import vHeader from '@/layouts/views/header.vue'
import { provide, ref } from 'vue';
  
interface CraneData {
  craneName: string;
  isShowHomeButton: boolean;
}
const craneName = ref<string>('');
const isShowHomeButton = ref<boolean>(false);
type ReceiveDataFn = (data: CraneData) => void;

const receiveData: ReceiveDataFn = (data) => {
  craneName.value = data.craneName;
  isShowHomeButton.value = data.isShowHomeButton;
};

provide('receiveData', receiveData);
</script>

<style scoped>
.content {
  background: linear-gradient(to bottom, #081627, #0B1C32);
}
</style>