import{t as r,u as _,p,v as f,s as h,d as I,m as x,j as e,P as w,I as j,T as o,w as a,B as S,i as y,l as k}from"./main-Bn3jZxQW.js";import{I as v}from"./check-mWjjDMSu.js";import{V as R,a as t}from"./VisualListItem-CHylqSsW.js";import{B as c}from"./ButtonLink-DaMceLGU.js";import"./_commonjsHelpers-DaWZu8wl.js";/* empty css               */const L=k(`
  mutation AllowCrossSigningReset($userId: ID!) {
    allowUserCrossSigningReset(input: { userId: $userId }) {
      user {
        id
      }
    }
  }
`);function B(){const{deepLink:d}=r.useSearch(),u=r.useNavigate(),{t:s}=_(),{data:{viewer:i}}=p(f);if(i.__typename!=="User")throw h();const l=i.id,n=I({mutationFn:async m=>x({query:L,variables:{userId:m}}),onSuccess:()=>{setTimeout(()=>{window.onAuthDone?window.onAuthDone():window.opener?.postMessage&&window.opener.postMessage("authDone","*")}),u({to:"/reset-cross-signing/success",replace:!0})}}),g=async()=>{n.mutate(l)};return e.jsxs(e.Fragment,{children:[e.jsx(w,{Icon:j,title:s("frontend.reset_cross_signing.heading"),invalid:!0}),e.jsx(o,{className:"text-center text-secondary",size:"md",children:s("frontend.reset_cross_signing.description")}),e.jsxs(R,{children:[e.jsx(t,{Icon:v,success:!0,children:s("frontend.reset_cross_signing.effect_list.positive_1")}),e.jsx(t,{Icon:a,children:s("frontend.reset_cross_signing.effect_list.neutral_1")}),e.jsx(t,{Icon:a,children:s("frontend.reset_cross_signing.effect_list.neutral_2")})]}),e.jsx(o,{className:"text-center",size:"md",weight:"semibold",children:s("frontend.reset_cross_signing.warning")}),e.jsxs(S,{kind:"primary",destructive:!0,disabled:n.isPending,onClick:g,children:[!!n.isPending&&e.jsx(y,{inline:!0}),s("frontend.reset_cross_signing.finish_reset")]}),d?e.jsx(c,{to:"/reset-cross-signing/cancelled",kind:"tertiary",replace:!0,children:s("action.cancel")}):e.jsx(c,{to:"/",kind:"tertiary",children:s("action.back")})]})}export{B as component};
//# sourceMappingURL=reset-cross-signing.index-BETMiB4D.js.map
