import{i as r,t as n,c as f,a as i,S as d,F as b,b as _,l as w,m as p,e as k,__tla as __tla_0}from"./TeamThemeProvider-BMMWqJEv.js";import{at as y,__tla as __tla_1}from"./UnlockedWallet-B6hSmM5s.js";import{B as u,__tla as __tla_2}from"./vault-state-DXmi8wtw.js";let z,C;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})()]).then(async()=>{var D=n('<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/50"><div class="w-full max-w-sm mx-4 bg-white rounded-xl shadow-2xl border border-[#E9EAEB] overflow-hidden"><div class="bg-[#181D27] px-5 py-4"><div class="flex items-center gap-2"><svg class="w-5 h-5 text-amber-400 shrink-0"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="M12 9v4M12 17h.01M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg><h3 class="text-base font-semibold text-white"></h3></div></div><div class="px-5 py-4 space-y-3"></div><div class="px-5 py-4 border-t border-[#E9EAEB] flex gap-3">');C=e=>(()=>{var g=D(),h=g.firstChild,c=h.firstChild,x=c.firstChild,t=x.firstChild,l=t.nextSibling,a=c.nextSibling,s=a.nextSibling;return r(l,()=>e.title),r(a,()=>e.children),r(s,()=>e.footer),g})();var L=n('<div><div class="text-xs text-[#717680] uppercase tracking-wide mb-1"></div><div class="text-sm font-mono text-[#181D27] bg-[#F5F5F5] rounded px-3 py-2 break-all">'),E=n('<div><div class="text-xs text-[#717680] uppercase tracking-wide mb-1"></div><div class="text-sm text-[#181D27]">'),F=n('<div><div class="text-xs text-[#717680] uppercase tracking-wide mb-1"></div><div class="bg-[#F5F5F5] rounded px-3 py-2 space-y-1">'),B=n('<div class="bg-[#F5F5F5] rounded px-3 py-2 space-y-1">'),S=n('<div><button type=button class="flex items-center gap-1 text-xs text-[#717680] uppercase tracking-wide mb-1"><i class="w-3 h-3 transition-transform">'),A=n('<div class="flex items-center gap-2 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2"><svg class="w-4 h-4 text-amber-500 shrink-0"viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><path d="M12 9v4M12 17h.01M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path></svg><p class="text-xs text-amber-700">'),M=n('<div class="text-xs text-[#94979C]">'),m=n('<div class="text-xs font-mono text-[#181D27] break-all whitespace-pre-wrap">'),$=n('<hr class="border-[#E9EAEB] my-1">');z=e=>{const g=()=>e.detailLines??[],h=()=>e.rawDetailLines??[],[c,x]=f(!1);return i(C,{get title(){return e.title},get footer(){return[i(u,{variant:"outline",class:"flex-1 border-[#E9EAEB] text-[#181D27] hover:bg-[#F5F5F5]",get disabled(){return e.rejectDisabled},get onClick(){return e.onReject},get children(){return e.rejectLabel}}),i(u,{get class(){return`flex-1 ${e.approveDisabled||e.approveBusy?"bg-[#181D27]/40 cursor-not-allowed":"bg-[#181D27] hover:bg-[#181D27]/90"} text-white`},get disabled(){return e.approveDisabled||e.approveBusy},get onClick(){return e.onApprove},get children(){return p(()=>!!e.approveBusy)()?e.approveBusyLabel??e.approveLabel:e.approveLabel}})]},get children(){return[(()=>{var t=L(),l=t.firstChild,a=l.nextSibling;return r(l,()=>e.requesterLabel),r(a,()=>e.requesterValue),t})(),(()=>{var t=E(),l=t.firstChild,a=l.nextSibling;return r(l,()=>e.actionLabel),r(a,()=>e.actionDetail),t})(),i(d,{get when(){return g().length>0},get children(){var t=F(),l=t.firstChild,a=l.nextSibling;return r(l,()=>e.detailsLabel??"Details"),r(a,i(b,{get each(){return g()},children:s=>i(d,{when:s!=="---",get fallback(){return $()},get children(){var o=m();return r(o,s),o}})})),t}}),i(d,{get when(){return h().length>0},get children(){var t=S(),l=t.firstChild,a=l.firstChild;return l.$$click=()=>x(!c()),r(a,i(y,{})),r(l,()=>e.rawDetailsLabel??"Raw data",null),r(t,i(d,{get when(){return c()},get children(){var s=B();return r(s,i(b,{get each(){return h()},children:o=>i(d,{when:o!=="---",get fallback(){return $()},get children(){var v=m();return r(v,o),v}})})),s}}),null),_(s=>w(a,"transform",c()?"rotate(90deg)":"rotate(0deg)")),t}}),i(d,{get when(){return e.warningText},get children(){var t=A(),l=t.firstChild,a=l.nextSibling;return r(a,()=>e.warningText),t}}),i(d,{get when(){return e.footerText},get children(){var t=M();return r(t,()=>e.footerText),t}})]}})};k(["click"])});export{z as A,C as W,__tla};