<template>
  <tick-or-choose
    v-if="$appSettings.myAccount.ampPreference"
    :value="value"
    @input="updateInput"
    type="radio"
    class="py-3 px-2"
    :title="$t('MyAccount.AmpPreference.AutoMaintenanceSalesSetting')"
    :layout="layout"
    :loading="loading"
    :sub-title="$t('MyAccount.AmpPreference.AutoMaintenanceSalesSetting.Description')"
    :options="[
      { value: 0, text: $t('MyAccount.AmpPreference.AutoMaintenanceSalesSetting.Stack') },
      { value: 1, text: $t('MyAccount.AmpPreference.AutoMaintenanceSalesSetting.Append') },
    ]"
  />
</template>
<script>
import TickOrChoose from '@/elements/choice-boxes/TickOrChoose'

export default {
  components: {
    TickOrChoose,
  },
  props: {
    value: {
      type: [Number, Array, String],
      default: null,
    },
    loading: {
      type: Boolean,
      default: false,
    },
    layout: {
      type: String,
      default: 'vertical',
    },
  },
  methods: {
    updateInput(val) {
      this.$emit('input', val)
    },
  },
}
</script>
