import{C as e,F as t,P as n,_ as r,j as i,q as a,z as o}from"./vue.js";function s(e){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,`true`),t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);if(document.body.removeChild(t),!n)throw Error(`copy text failed`)}async function c(e){let t=null;try{await Promise.race([navigator.clipboard.writeText(e),new Promise((e,n)=>{t=setTimeout(()=>{n(Error(`clipboard write timeout`))},800)})])}finally{t&&clearTimeout(t)}}async function l(e){try{s(e);return}catch{if(navigator.clipboard&&window.isSecureContext){await c(e);return}}throw Error(`copy text failed`)}var u=e({__name:`AppEmptyState`,props:{as:{},compact:{type:Boolean}},setup(e){return(s,c)=>(i(),r(t(e.as??`div`),{class:a([`rounded-xl border border-dashed border-(--dashboard-border) bg-(--dashboard-panel-muted) text-sm text-(--dashboard-text-soft)`,e.compact?`px-3 py-4`:`p-5`])},{default:o(()=>[n(s.$slots,`default`)]),_:3},8,[`class`]))}});export{l as n,u as t};