<template>
  <b-container fluid="xl">
    <page-title :description="$t('appPageTitle.dynamicInformation')" />
    <table-date-picker
      :switch-time-scale="switchTimeScale"
      :time-scale="timeScale"
    />
    <motherboard-temp :time-scale="timeScale"></motherboard-temp>
  </b-container>
</template>

<script>
import PageTitle from '@/components/_sila/Global/PageTitle';
import TableDatePicker from '@/components/_sila/Global/TableDatePicker';

import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin';
import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin';
import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin';

import MotherboardTemp from './MotherboardTemp';

export default {
  components: { MotherboardTemp, PageTitle, TableDatePicker },
  mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin],
  data() {
    return {
      timeScale: 'hour',
    };
  },

  methods: {
    switchTimeScale(period) {
      this.timeScale = period;
    },
  },
};
</script>
