import{Gl as e,Ll as a}from"./shared-0-C4kdVF7Y.js";import{ki as s}from"./vendor-frame-CwiylG4Y.js";import{nn as i}from"./vendor-all-2-BJdkbLSj.js";import{R as r}from"./shared-frame-DbQbH4Yr.js";import{Un as n}from"./shared-4-6CEyRAHb.js";var t=s();function o(){const{account:s}=a(),i=e(),r=s?.memberships.filter(e=>e.organization.capabilities.includes("raven")).map(e=>e.organization)||[];return!i&&r.length>0}function m(){const{account:e}=a(),s=e?.memberships.filter(e=>e.organization.capabilities.includes("raven")).map(e=>e.organization)||[];return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 p-8",children:[(0,t.jsx)("h1",{className:"text-center text-4xl font-medium",children:(0,t.jsx)(i,{defaultMessage:"Are you in the right organization?",id:"3UwC7GmZfy"})}),(0,t.jsx)("p",{className:"text-text-200",children:1===s.length?(0,t.jsx)(i,{defaultMessage:"You can access this page in your Team organization",id:"gmeGoAoANG"}):(0,t.jsx)(i,{defaultMessage:"You can access this page in one of your Team organizations",id:"zqrN+N+vQJ"})}),(0,t.jsx)("div",{className:"flex flex-col items-center gap-2",children:s.map(e=>(0,t.jsx)(c,{orgId:e.uuid,orgName:e.name},e.uuid))})]})}function c({orgId:e,orgName:a}){const{switchAndRefresh:s}=n();return(0,t.jsx)(r,{variant:"primary",onClick:()=>s(e),children:(0,t.jsx)(i,{defaultMessage:"Switch to {orgName}",id:"OU/ivjm0n1",values:{orgName:a}})})}export{o as n,m as t};