import{iv as j,iU as A,iQ as I,iA as E,fH as e,cz as M,aD as i,ck as r,cv as C,bp as R,cG as d,ex as l}from"./strapi-ye6TfKul.js";import{s as U}from"./selectors-Br3dx8yO.js";const _="https://strapi.io/billing/request-seats",b="https://strapi.io/billing/manage-seats",D=()=>{const{formatMessage:s}=j(),{settings:c}=A(U),{isLoading:a,allowedActions:{canRead:m,canCreate:g,canUpdate:p,canDelete:u}}=I(c?.users??{}),{license:n,isError:x,isLoading:f}=E({enabled:!a&&m&&g&&p&&u});if(x||(a||f)||!n)return null;const{licenseLimitStatus:h,enforcementUserCount:o,permittedSeats:t,type:L}=n;return t?e.jsxs(M.Item,{col:6,xs:12,direction:"column",alignItems:"stretch",children:[e.jsx(i,{variant:"sigma",textColor:"neutral600",children:s({id:"Settings.application.admin-seats",defaultMessage:"Admin seats"})}),e.jsxs(r,{gap:2,children:[e.jsx(r,{children:e.jsx(i,{tag:"p",children:s({id:"Settings.application.ee.admin-seats.count",defaultMessage:"<text>{enforcementUserCount}</text>/{permittedSeats}"},{permittedSeats:t,enforcementUserCount:o,text:S=>e.jsx(i,{fontWeight:"semiBold",textColor:o>t?"danger500":void 0,children:S})})})}),h==="OVER_LIMIT"&&e.jsx(C,{label:s({id:"Settings.application.ee.admin-seats.at-limit-tooltip",defaultMessage:"At limit: add seats to invite more users"}),children:e.jsx(R,{width:"1.4rem",height:"1.4rem",fill:"danger500"})})]}),L==="gold"?e.jsx(d,{href:_,endIcon:e.jsx(l,{}),children:s({id:"Settings.application.ee.admin-seats.support",defaultMessage:"Contact sales"})}):e.jsx(d,{href:b,isExternal:!0,endIcon:e.jsx(l,{}),children:s({id:"Settings.application.ee.admin-seats.add-seats",defaultMessage:"Manage seats"})})]}):null};export{D as AdminSeatInfoEE};
