1import{r as i,j as l}from"./index-CL5CVFz4.js";import{d8 as k,d9 as f,dc as y,dS as w,dk as C}from"./PrivyWallet-BcumCOkd.js";import{n as g}from"./ScreenLayout-BAaQVxl--DjzDmUSx.js";import{C as h}from"./circle-alert-BBmSwiu6.js";import{C as v}from"./circle-check-big-sYyn2uB1.js";import{c as S}from"./createLucideIcon-CBiy1JoO.js";import"./ModalFooter-Dgk75taJ-nnOvyVXW.js";import"./Screen-u_C2Hkch-BMvby5wo.js";import"./index-CWARkn2w-D8i2KdtH.js";/** 2 * @license lucide-react v0.554.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const b=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],x=S("ban",b),R=({appName:r,success:a,error:e,onRevoke:t,onDeny:s,onClose:o})=>l.jsx(g,a||e?{title:e?"Something went wrong":"Success!",subtitle:e?"Please try again.":"You've successfully revoked permissions.",icon:e?h:v,iconVariant:e?"error":"success",onBack:o,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${r} will no longer be able to use this wallet on your behalf when you are not online.`,icon:x,primaryCta:{label:"Confirm",onClick:t},secondaryCta:{label:"Deny",onClick:s},onBack:o,watermark:!0}),T={component:()=>{let{data:r}=k(),a=f(),{closePrivyModal:e}=y(),[t,s]=i.useState(!1),[o,u]=i.useState(),{onRevoke:m,onSuccess:d,onError:p}=r.delegatedActions.revoke,n=async()=>{t?d():p(o??new C("User declined revoking access to their delegated wallet.")),e({shouldCallAuthOnSuccess:!1})};return i.useEffect((()=>{if(!t&&!o)return;let c=setTimeout(n,w);return()=>clearTimeout(c)}),[t,o]),l.jsx(R,{appName:a.name,success:t,error:o,onRevoke:async()=>{try{await m(),s(!0)}catch(c){u(c)}},onDeny:()=>{n()},onClose:n})}};export{T as DelegatedActionsRevokeScreen,R as DelegatedActionsRevokeScreenView,T as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.