1<script>
2export default {
3  props: {
4    type: {
5      type: String,
6      required: false,
7      default: '',
8    },
9    count: {
10      type: Number,
11      required: false,
12      default: 0,
13    },
14    showOutput: {
15      type: Boolean,
16      required: false,
17      default: true,
18    },
19  },
20  computed: {
21    hasKeys() {
22      return this.type !== '' && this.count;
23    },
24    showTypeText() {
25      return this.type && this.count && this.showOutput;
26    },
27  },
28};
29</script>
30
31<template>
32  <div class="prompt">
33    <span v-if="showTypeText"> {{ type }} [{{ count }}]: </span>
34  </div>
35</template>
36
37<style scoped>
38.prompt {
39  padding: 0 10px;
40  min-width: 7em;
41  font-family: monospace;
42}
43</style>
44