import Vue from "vue";
import QrcodeVue from 'qrcode.vue';
export default Vue.extend({
    components:{QrcodeVue},
    template: `
        <div @click="showBig">
            <QrcodeVue :value="code" :size="40" v-if="code"></QrcodeVue>
            <Modal
                v-model="show"
                :title="this.params.colDef.headerName"
                footer-hide
                :width='432'
                >
                <QrcodeVue :value="code" :size="400" v-if="code"></QrcodeVue>
            </Modal>
        </div>
    `,
    name: 'translate-cell',
    data() {
        return {
            code:null,
            show:false
        };
    },
    mounted(){
        if ( this.params.value ){
            this.code = this.params.value;
        }
    },
    computed: {

    },
    methods: {
        showBig(){
            if (this.code){
                this.show = true;
            }
        }
    }
});