import initCtx from "@/utils/ctx.js";
import copy from "copy-to-clipboard"

export default function () {
	const {utils} = initCtx(this)

	this.closePopup = function () {
		utils.closePopup()
	}

	this.isCopied = false

	this.copy = function () {
		copy(this.code)
		this.isCopied = true

		this.$delay(function () {
			this.isCopied = false
		}, 2500)
	}
}