<commit_before><template>
<div>
  <p class="error" v-if="isError">
    {{ errorText }}
  </p>

  <p class="has-text-right">
    <a
      :class="{
        button: true,
        'is-primary': true,
        'is-loading': isLoading,
        'is-disabled': isDisabled
      }"
      @click="$emit('confirm')"
    >
      {{ confirmLabel || $t("main.confirmation") }}
    </a>
    <button
      @click="$emit('cancel')"
      class="button is-link"
    >
      {{ cancelLabel || $t('main.cancel') }}
    </button>
  </p>
</div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'

export default {
  name: 'modal-footer',

  components: {},

  props: {
    cancelLabel: {
      type: String,
      default: ''
    },
    confirmLabel: {
      type: String,
      default: ''
    },
    errorText: {
      type: String,
      default: ''
    },
    isDisabled: {
      type: Boolean,
      default: false
    },
    isError: {
      type: Boolean,
      default: false
    },
    isLoading: {
      type: Boolean,
      default: false
    }
  },

  computed: {
    ...mapGetters([
    ])
  },

  methods: {
    ...mapActions([
    ])
  },

  watch: {}
}
</script>

<style lang="scss" scoped>
.error {
  margin-top: 1em;
}
</style>
<commit_msg>[styl] Improve modal error displaying<commit_after><template>
<div>

  <p class="has-text-right">
    <a
      :class="{
        button: true,
        'is-primary': true,
        'is-loading': isLoading,
        'is-disabled': isDisabled
      }"
      @click="$emit('confirm')"
    >
      {{ confirmLabel || $t("main.confirmation") }}
    </a>
    <button
      @click="$emit('cancel')"
      class="button is-link"
    >
      {{ cancelLabel || $t('main.cancel') }}
    </button>

  </p>
  <p class="error mt1 has-text-right" v-if="isError">
    {{ errorText }}
  </p>
</div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'

export default {
  name: 'modal-footer',

  components: {},

  props: {
    cancelLabel: {
      type: String,
      default: ''
    },
    confirmLabel: {
      type: String,
      default: ''
    },
    errorText: {
      type: String,
      default: ''
    },
    isDisabled: {
      type: Boolean,
      default: false
    },
    isError: {
      type: Boolean,
      default: false
    },
    isLoading: {
      type: Boolean,
      default: false
    }
  },

  computed: {
    ...mapGetters([
    ])
  },

  methods: {
    ...mapActions([
    ])
  },

  watch: {}
}
</script>

<style lang="scss" scoped>
.error {
  margin-top: 1em;
}
</style>

{'fraction_non_alphanumeric': 0.1803921568627451, 'fraction_numerical': 0.001176470588235294, 'mean_word_length': 1.9457274826789839, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2255912', 'n_tokens_mistral': 904, 'n_tokens_neox': 883, 'n_words': 176}