import{o as e,r as s}from"./rolldown-runtime-iuO8RvI4.js";import{Ul as a,dd as t}from"./shared-0-C4kdVF7Y.js";import{Mi as r,ki as o}from"./vendor-frame-CwiylG4Y.js";import{nn as i}from"./vendor-all-2-BJdkbLSj.js";import{R as n,w as l}from"./shared-frame-DbQbH4Yr.js";import{s as u}from"./cb5f4bcf7-q1mY17Am.js";var d=s({InsufficientSeatsModal:()=>h}),m=(r(),o());function c(e){const{isOpen:s,onClose:r,seatTier:o,seatsNeeded:d,requestCount:c,crossTierAssign:h}=e,j=function(e){return e.isJoinRequestApproval?"join_request":e.emails?"invite":"reassign"}(e),p=u()[o]||o,x=e.emails?.length??e.members?.length??c??0,b=a(t.BillingManage);return(0,m.jsx)(l.Root,{open:s,onOpenChange:e=>!e&&r(),children:(0,m.jsxs)(l.Popup,{size:"md",children:[(0,m.jsx)(l.Header,{children:(0,m.jsx)(i,{defaultMessage:"Insufficient seats",id:"BS3HW6pEv8"})}),(0,m.jsx)("div",{className:"mt-6",children:(0,m.jsxs)("div",{className:"text-primary mb-4",children:[(0,m.jsx)("p",{className:"mb-2",children:"join_request"===j?(0,m.jsx)(i,{defaultMessage:"To approve {requestText}, you need {seatsText}.",id:"LmYatX2q5R",values:{requestText:(0,m.jsx)(i,{defaultMessage:"{count, plural, one {# request} other {# requests}}",id:"ZTZBr/f1jP",values:{count:x}}),seatsText:(0,m.jsx)(i,{defaultMessage:"{count} additional {tierLabel} {count, plural, one {seat} other {seats}}",id:"9iEUZavjVe",values:{count:d,tierLabel:String(p).toLowerCase()}})}}):"invite"===j?h?(0,m.jsx)(i,{defaultMessage:"To invite {memberCount, plural, one {# member} other {# members}}, you need {seatsText}.",id:"GWYKGKRISW",values:{memberCount:x,seatsText:(0,m.jsx)(i,{defaultMessage:"{count} additional {tierLabel} {count, plural, one {seat} other {seats}}",id:"9iEUZavjVe",values:{count:d,tierLabel:String(p).toLowerCase()}})}}):(0,m.jsx)(i,{defaultMessage:"To invite {memberCount} {tierLabel} {memberCount, plural, one {member} other {members}}, you need {seatsText}.",id:"p/huyLovOG",values:{memberCount:x,tierLabel:String(p).toLowerCase(),seatsText:(0,m.jsx)(i,{defaultMessage:"{count} additional {tierLabel} {count, plural, one {seat} other {seats}}",id:"9iEUZavjVe",values:{count:d,tierLabel:String(p).toLowerCase()}})}}):(0,m.jsx)(i,{defaultMessage:"To move {memberCount, plural, one {# member} other {# members}} to {tierLabel}, you need {seatsText}.",id:"iqoUYjV/Te",values:{memberCount:x,tierLabel:String(p).toLowerCase(),seatsText:(0,m.jsx)(i,{defaultMessage:"{count} additional {tierLabel} {count, plural, one {seat} other {seats}}",id:"9iEUZavjVe",values:{count:d,tierLabel:String(p).toLowerCase()}})}})}),(0,m.jsx)("p",{children:b?"join_request"===j||!1===e.canChangeTier?(0,m.jsx)(i,{defaultMessage:"Contact your Anthropic representative to procure additional seats.",id:"53rjekVsYJ"}):(0,m.jsx)(i,{defaultMessage:"Contact your Anthropic representative to procure additional seats, or use a tier which has enough available seats.",id:"vKsO0y5sme"}):"join_request"===j||!1===e.canChangeTier?(0,m.jsx)(i,{defaultMessage:"New members are added to the lowest available seat tier. Contact an owner to purchase more seats.",id:"aKWKFy/q6Y"}):"invite"===j?(0,m.jsx)(i,{defaultMessage:"Contact an owner to purchase more seats, or invite them on a tier which has enough available seats.",id:"7ni7THbLKt"}):(0,m.jsx)(i,{defaultMessage:"Contact an owner to purchase more seats, or assign them to a tier which has enough available seats.",id:"MCguqxZw2k"})})]})}),(0,m.jsx)(l.Footer,{children:(0,m.jsx)(n,{onClick:r,variant:"primary",children:(0,m.jsx)(i,{defaultMessage:"Close",id:"rbrahOGMC3"})})})]})})}function h(e){return a(t.BillingManage),(0,m.jsx)(c,{...e})}export{d as n,h as t};