<commit_before><template>
    <button :class="classObject"
            @click.stop.prevent="click"
            :href="to"
            :is="componentType"
            :to="to"
            :exact="exact"
    >
        <slot></slot>
    </button>
</template>


<script>
    export default {
        computed: {
            classObject(){
                return [
                    'btn',
                    this.btnVariant,
                    this.btnSize,
                    this.btnBlock,
                    this.btnDisabled,
                    this.inactive ? 'btn-inactive' : ''
                ];
            },
            componentType(){
                return this.to ? 'router-link' : 'a';
            },
            btnBlock() {
                return this.block ? `btn-block` : '';
            },
            btnVariant() {
                return !this.variant ? `btn-secondary` : `btn-${this.variant}`
            },
            btnSize() {
                return !this.size ? '' : `btn-${this.size}`
            },
            btnDisabled() {
                return this.disabled ? 'disabled' : ''
            }
        },
        props: {
            block: {
                type: Boolean,
                default: false
            },
            disabled: {
                type: Boolean,
                default: false
            },
            inactive: {
                type: Boolean,
                default: false
            },
            link: {
                type: String,
                default: ''
            },
            role: {
                type: String,
                default: ''
            },
            size: {
                type: String,
                default: 'md'
            },
            variant: {
                type: String,
                default: 'secondary'
            },
            to: {
                type: [String, Object],
                default: '',
            },
            exact: {
                type: Boolean,
                default: false,
            },
        },
        methods: {
            click: function () {
                this.$emit('click', this.link);
                if (this.$router && this.to && this.to.length) {
                    this.$router.push(this.to);
                }
            },
        },
    }
</script><commit_msg>Remove link property in flavour of to<commit_after><template>
    <button :class="classObject"
            @click.stop.prevent="click"
            :href="to"
            :is="componentType"
            :to="to"
            :exact="exact"
    >
        <slot></slot>
    </button>
</template>


<script>
    export default {
        computed: {
            classObject(){
                return [
                    'btn',
                    this.btnVariant,
                    this.btnSize,
                    this.btnBlock,
                    this.btnDisabled,
                    this.inactive ? 'btn-inactive' : ''
                ];
            },
            componentType(){
                return this.to ? 'router-link' : 'a';
            },
            btnBlock() {
                return this.block ? `btn-block` : '';
            },
            btnVariant() {
                return !this.variant ? `btn-secondary` : `btn-${this.variant}`
            },
            btnSize() {
                return !this.size ? '' : `btn-${this.size}`
            },
            btnDisabled() {
                return this.disabled ? 'disabled' : ''
            }
        },
        props: {
            block: {
                type: Boolean,
                default: false
            },
            disabled: {
                type: Boolean,
                default: false
            },
            inactive: {
                type: Boolean,
                default: false
            },
            role: {
                type: String,
                default: ''
            },
            size: {
                type: String,
                default: 'md'
            },
            variant: {
                type: String,
                default: 'secondary'
            },
            to: {
                type: [String, Object],
                default: '',
            },
            exact: {
                type: Boolean,
                default: false,
            },
        },
        methods: {
            click: function () {
                this.$emit('click', this.to);
                if (this.$router && this.to && this.to.length) {
                    this.$router.push(this.to);
                }
            },
        },
    }
</script>
{'fraction_non_alphanumeric': 0.11911477543935778, 'fraction_numerical': 0.0, 'mean_word_length': 0.80078125, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '3670633', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1082, 'n_words': 203}