import { defineComponent as r, ref as m, computed as p, onUnmounted as u, createBlock as f, openBlock as d, unref as _, normalizeClass as y } from "vue";
import z from "../PlIcon16/PlIcon16.vue.js";
const C = {
  name: "PlClipboard"
}, T = /* @__PURE__ */ r({
  ...C,
  props: {
    size: {}
  },
  emits: ["copy"],
  setup(t, { emit: c }) {
    const n = t, s = c, e = m(!1), a = p(() => e.value ? "clipboard-copied" : "clipboard");
    let o;
    function l() {
      clearTimeout(o), e.value = !0, s("copy"), o = window.setTimeout(() => {
        e.value = !1;
      }, 1e3);
    }
    return u(() => {
      clearTimeout(o);
    }), (i, k) => (d(), f(_(z), {
      name: a.value,
      size: n.size,
      class: y(i.$style.copy),
      onClick: l
    }, null, 8, ["name", "size", "class"]));
  }
});
export {
  T as default
};
//# sourceMappingURL=PlClipboard.vue2.js.map
