import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
import { createBlock as t, mergeProps as n, openBlock as r, resolveComponent as i, resolveDirective as a, withDirectives as o } from "vue";
import s from "clipboard-copy";
//#region src/components/wt-copy-action/wt-copy-action.vue
var c = null, l = {
	name: "WtCopyAction",
	props: {
		value: { type: String },
		tooltips: {
			type: Object,
			default: () => ({})
		}
	},
	data: () => ({ copied: !1 }),
	computed: {
		copyTooltip() {
			return this.tooltips.copy || this.$t("webitelUI.copyAction.copy");
		},
		copiedTooltip() {
			return this.tooltips.copied || this.$t("webitelUI.copyAction.copied");
		}
	},
	methods: { async copy() {
		await s(this.value), this.copied = this.value, c && window.clearTimeout(c), c = setTimeout(() => {
			this.copied = null;
		}, 1500);
	} }
};
function u(e, s, c, l, u, d) {
	let f = i("wt-icon-btn"), p = a("tooltip");
	return o((r(), t(f, n(e.$attrs, {
		icon: e.copied ? "done" : "copy",
		class: "copy-action"
	}, { onClick: d.copy }), null, 16, ["icon", "onClick"])), [[p, e.copied ? d.copiedTooltip : d.copyTooltip]]);
}
var d = /*#__PURE__*/ e(l, [["render", u]]);
//#endregion
export { d as default };
