<template>
	<div>
		<img @click="installExtension" :src=" imgUrl !== '' ? imgUrl : btnUrl " />
	</div>
</template>
<script>
let btnUrl = require('../static/svg/icon-install-nft-plugin.svg');

export default {
	name: 'install_chrome',
	props: {
		extensionsInstallUrl: {
			type: String,
			default: '',
		},
		imgUrl: {
			type: String,
			default: '',
		}
	},
	data() {
		return {
			config: {},
			btnUrl: btnUrl,
		};
	},
	methods: {
		installExtension() {
			this.$emit('installClick', {});
			window.open(this.extensionsInstallUrl);
		},
	},
};
</script>
<style lang="scss" scoped>
img {
	cursor: pointer;
}
</style>
