import{C as r,l as n,n as t,x as l,t as s,u as c,X as p,A as o,B as m,_ as h,D as v,T as b,e as k}from"./Button-DnvJ7MH3.js";import{C as g}from"./copy-CViK653K.js";const y={class:"relative min-h-screen overflow-hidden bg-gradient-to-br from-emerald-950/20 via-zinc-50 to-amber-50/30 dark:from-zinc-950 dark:via-zinc-900 dark:to-emerald-950/20"},w={class:"relative mx-auto flex min-h-screen max-w-md flex-col items-center justify-center px-6 py-16"},z={class:"w-full max-w-sm overflow-hidden rounded-3xl border border-zinc-200/80 bg-white/90 shadow-xl shadow-zinc-200/50 backdrop-blur-sm dark:border-zinc-700/80 dark:bg-zinc-800/95 dark:shadow-zinc-950/50"},_={class:"relative px-10 pt-12 pb-10"},C={class:"relative mx-auto flex h-36 w-36 items-center justify-center"},j={class:"relative flex h-28 w-28 shrink-0 items-center justify-center overflow-hidden rounded-2xl bg-gradient-to-br from-zinc-100 to-zinc-50 ring-2 ring-zinc-200/60 dark:from-zinc-800 dark:to-zinc-900 dark:ring-zinc-600/40"},U=["src","alt"],S={class:"mt-6 text-center text-sm font-medium uppercase tracking-widest text-emerald-600 dark:text-emerald-400"},T={class:"mt-2 text-center text-2xl font-bold tracking-tight text-zinc-900 dark:text-white"},q={key:0,class:"mt-4 text-center text-base text-zinc-600 dark:text-zinc-300"},B={key:1,class:"mt-4 text-center text-base text-zinc-500 dark:text-zinc-400"},N={key:0,class:"mt-12"},E=Object.assign({layout:null},{__name:"Share",props:{achievement:{type:Object,required:!0},displayUsername:{type:String,default:null},shareUrl:{type:String,default:""}},setup(a){const u=a,d=k(!1);function x(){return typeof window<"u"?window.location.href:u.shareUrl||""}function f(){d.value=!0;const i=x();try{if(navigator.clipboard?.writeText)navigator.clipboard.writeText(i).catch(()=>{});else{const e=document.createElement("textarea");e.value=i,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}catch{}}return(i,e)=>(r(),n("div",y,[e[3]||(e[3]=t("div",{class:"pointer-events-none absolute inset-0 opacity-[0.03] dark:opacity-[0.04]",style:{"background-image":"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)","background-size":"40px 40px"},"aria-hidden":""},null,-1)),e[4]||(e[4]=t("div",{class:"absolute inset-0 bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,var(--tw-gradient-stops))] from-emerald-400/15 to-transparent dark:from-emerald-500/10","aria-hidden":""},null,-1)),t("div",w,[t("div",z,[t("div",_,[t("div",C,[e[0]||(e[0]=t("div",{class:"absolute inset-0 rounded-full bg-gradient-to-br from-emerald-400/30 to-amber-500/20 blur-2xl dark:from-emerald-500/20 dark:to-amber-600/15","aria-hidden":""},null,-1)),t("div",j,[a.achievement.image?(r(),n("img",{key:0,src:a.achievement.image,alt:a.achievement.name,class:"h-20 w-20 object-contain drop-shadow-sm"},null,8,U)):l("",!0)])]),t("p",S," R$ "+s(c(p)(a.achievement.threshold??0))+" em vendas ",1),t("h1",T,s(a.achievement.name),1),a.displayUsername?(r(),n("p",q,s(a.displayUsername)+" conquistou ",1)):(r(),n("p",B," Conquista desbloqueada ")),e[1]||(e[1]=t("p",{class:"mt-8 text-center text-xs font-medium tracking-wider text-zinc-400 dark:text-zinc-500"}," Getfy ",-1))])]),o(b,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0","leave-active-class":"transition duration-150 ease-in","leave-to-class":"opacity-0"},{default:m(()=>[d.value?l("",!0):(r(),n("div",N,[o(h,{variant:"outline",size:"sm",class:"gap-2 rounded-full px-6",onClick:f},{default:m(()=>[o(c(g),{class:"h-4 w-4"}),e[2]||(e[2]=v(" Copiar link ",-1))]),_:1})]))]),_:1})])]))}});export{E as default};
