"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
const utils = require("../utils/utils.js");
function useCopy() {
  const { t } = uikitBaseComponentVue3.useUIKit();
  const copy = async (value) => {
    const success = await utils.copyText(value);
    if (success) {
      uikitBaseComponentVue3.TUIToast.info({ message: t("Copy Success") });
    } else {
      uikitBaseComponentVue3.TUIToast.error({ message: t("Copy Failed") });
    }
  };
  return {
    copy
  };
}
exports.useCopy = useCopy;
