<template>
  <div class="project-model-interaction-window">
    <div>
      <button-input type="primary"
                    @click="predict">predict all images
      </button-input>
    </div>

    <div>
      <button-input type="primary"
                    @click="fit">fit model with new data
      </button-input>
    </div>
  </div>
</template>

<script>
import ButtonInput from "@/components/base/button-input";

export default {
  name: "project-model-interaction-window",
  components: {ButtonInput},
  props: ['currentProject', 'socket'],
  methods: {
    predict: function () {
      this.socket.post('/projects/' + this.currentProject.id, {'predictAll': true});
    },
    fit: function () {
      this.socket.post('/projects/' + this.currentProject.id, {'fit': true});
    }
  }
}
</script>

<style scoped>
.project-model-interaction-window {
  padding: 1rem;
}

.project-model-interaction-window > div {
  margin-bottom: 1rem;
}
</style>