import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{dt as t}from"./vendor-primevue-CIZeDNer.js";import{l as n}from"./vendor-vueuse-BDeAjd2M.js";import{o as r}from"./i18n-qK6isbxx.js";function useCopyToClipboard(){let{copy:e,copied:i}=n({legacy:!0}),a=t();async function copyToClipboard(t){try{await e(t),i.value?a.add({severity:`success`,summary:r(`g.success`),detail:r(`clipboard.successMessage`),life:3e3}):a.add({severity:`error`,summary:r(`g.error`),detail:r(`clipboard.errorMessage`)})}catch{a.add({severity:`error`,summary:r(`g.error`),detail:r(`clipboard.errorMessage`)})}}return{copyToClipboard}}export{useCopyToClipboard as t};
//# sourceMappingURL=useCopyToClipboard-DeXt33ef.js.map