<template>
    <div class="text-right action-buttons-wrapper">
        <button type="button" class="btn btn-success waves-effect waves-light" v-bind:disabled="btnSaveDisable" v-on:click="onSave">
            <i class="fa fa-arrow-circle-down"></i>
            {{ trans.save }}
        </button>
        <button type="button" class="btn btn-danger waves-effect waves-light" v-on:click="onCancel">
            <i class="fa fa-ban"></i>
            {{ trans.cancel }}
        </button>
    </div>
</template>

<style scoped>
    button {
        min-width: 93px;
        margin-left: 5px;
        margin-right: 5px;
    }
    .action-buttons-wrapper {
        margin-top: 20px;
    }
</style>

<script>
export default {
    props: { 
        trans: {
            type: Object 
        },
        btnSaveDisable: {
            type: Boolean,
            default: false
        }
    },
    methods: {
        onSave() {
            this.$emit('insert-save');
        },
        onCancel() {
            this.$emit('insert-cancel');
        }
    }
}
</script>