import { useUIKit, TUIToast } from "@tencentcloud/uikit-base-component-vue3";
import { copyText } from "../utils/utils.mjs";
function useCopy() {
  const { t } = useUIKit();
  const copy = async (value) => {
    const success = await copyText(value);
    if (success) {
      TUIToast.info({ message: t("Copy Success") });
    } else {
      TUIToast.error({ message: t("Copy Failed") });
    }
  };
  return {
    copy
  };
}
export {
  useCopy
};
