import AddRoomEntryButton from '@/components/rooms/AddRoomEntryButton.vue';
import RoomEntry from '@/components/rooms/RoomEntry.vue';
import RoomGroupWidget from '@/components/rooms/RoomGroupWidget';
import EntryCountWidget from '@/components/rooms/EntryCountWidget';
import RoomActions from '@/components/rooms/RoomActions';

export default {
  components: {
    EntryCountWidget,
    RoomGroupWidget,
    AddRoomEntryButton,
    RoomEntry,
    RoomActions
  },

  beforeDestroy() {
    this.$store.dispatch('setSpecialContainerClass', '');
  },

  created() {
  },

  data() {
    return {
      room: [],
      entries: []
    };
  },

  computed: {
    roomEntryCount() {
      return (this.room && this.room.roomEntries) ? this.room.roomEntries.length : 0;
    },
    roomAppearance() {
      return this.room ? this.room.appearance : '';
    }
  }
};
