import { getSessionStorageAnswer, disabledHistoryBack, movePage, checkAnswerData, checkRefferrerPages, } from './common.js';
import Validate from "./validate.js";

disabledHistoryBack();

if (checkAnswerData() && checkRefferrerPages(['step3.html', 'step5.html'])) {
  const { createApp } = Vue;

  const app = createApp({
    data () {
      return getSessionStorageAnswer();
    },
    mounted () {
      this.$el.style.display = '';
    },
    computed: {
      validate () {
        return !Validate.require(this.body_shape);
      },
  
      movePage (e) {
        return (direction, href) => {
          movePage(direction, href, this.$data);
        }
      }
    },
    methods: {}
  }).mount('#app');
}