import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Ll as s,Ot as a,Vi as n,au as t,bi as r,js as i,nu as o,xl as l,z_ as c}from"./shared-0-C4kdVF7Y.js";import{Mi as d,ki as u}from"./vendor-frame-CwiylG4Y.js";import{hp as m}from"./shared-1-3-6x7RKF.js";import{nn as f}from"./vendor-all-2-BJdkbLSj.js";import{$ as p}from"./shared-frame-DbQbH4Yr.js";import{al as x}from"./shared-4-6CEyRAHb.js";import{Xo as j}from"./shared-5-UQAFGbWu.js";import{t as h}from"./c9a5287df-Da7X4RWQ.js";var g=e(d());function _({scim:e=!1}={}){const n=t(),r=o(),{activeOrganization:l}=s(),d=n&&!r,{data:u}=i({enabled:d,cached:!0}),m=!!l?.parent_organization_uuid,{data:f}=a({enabled:e&&d&&m}),p=c("__gb__1741461476",d&&h(u)>50);return{showSeatGatedUpsells:p,showScimUpsells:e&&p&&!0===f?.sso_enabled}}var v=u();function b(e){return`/upgrade?from=ent_preview_${e}`}var w=l??(0,g.createContext)(null);function y(e){return function(s){const a=(0,g.useContext)(w);return null==a?null:(0,v.jsx)(e,{...s})}}function k(e){const{track:s}=r();return(0,g.useCallback)(()=>{s({event_key:"claudeai.admin_settings.ent_upgrade_preview.clicked",upsell_surface:e})},[e,s])}function M(e,s){const{track:a}=r(),n=(0,g.useRef)(!1);(0,g.useEffect)(()=>{s&&!n.current&&(n.current=!0,a({event_key:"claudeai.admin_settings.ent_upgrade_preview.shown",upsell_surface:e}))},[s,e,a])}function N({surface:e,children:s}){const a=k(e);return(0,v.jsx)(x,{external:!0,render:(0,v.jsx)(m,{href:b(e),onClick:a,webBehavior:"new-tab"}),children:s??(0,v.jsx)(f,{defaultMessage:"Available on Enterprise",id:"fwHS3jwKLa"})})}function S(e,s){const{showScimUpsells:a}=_({scim:!0}),{track:n}=r(),[t,i]=(0,g.useState)(!1);!t&&s&&a&&e>=5&&i(!0);const o=s&&t&&a,l=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{if(!s)return i(!1),void(l.current=!1);o&&!l.current&&(l.current=!0,n({event_key:"claudeai.admin_settings.ent_upgrade_preview.shown",upsell_surface:"add_members_scim_tip"}))},[s,o,n]),o}function C({className:e}){return(0,v.jsxs)("div",{className:`animate-in fade-in slide-in-from-top-1 duration-200 motion-reduce:animate-none flex flex-wrap items-center gap-x-1.5 text-footnote text-muted ${e??""}`,children:[(0,v.jsx)(f,{defaultMessage:"Adding people one by one?",id:"8rUmxzZqsP"}),(0,v.jsx)(N,{surface:"add_members_scim_tip",children:(0,v.jsx)(f,{defaultMessage:"Auto-provision with SCIM on Enterprise",id:"KqVaGPVP6s"})})]})}var z=y(function({surface:e,label:s,description:a}){const{showSeatGatedUpsells:n}=_();return M(e,n),n?(0,v.jsx)(j,{label:(0,v.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-muted",children:[(0,v.jsx)(p,{name:"Lock",size:"sm"}),s]}),description:a,control:(0,v.jsx)(N,{surface:e})}):null}),U=y(function(){const{showScimUpsells:e}=_({scim:!0});return M("scim_provisioning",e),e?(0,v.jsxs)("div",{className:"-mt-1 rounded-xl shadow-card-ring flex items-start gap-3 px-4 py-3.5 text-muted",children:[(0,v.jsx)(p,{name:"Lock",size:"sm",className:"mt-0.5 shrink-0"}),(0,v.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,v.jsx)("div",{className:"text-body font-medium",children:(0,v.jsx)(f,{defaultMessage:"SCIM directory sync",id:"772a2Sk1gY"})}),(0,v.jsx)("div",{className:"text-body",children:(0,v.jsx)(f,{defaultMessage:"Sync members, groups, and removals automatically from your identity provider.",id:"byHr1214sm"})}),(0,v.jsx)("div",{className:"mt-1",children:(0,v.jsx)(N,{surface:"scim_provisioning"})})]})]}):null}),L=y(function({surface:e,label:s}){const{showSeatGatedUpsells:a}=_(),t=k(e);return M(e,a),a?(0,v.jsx)("li",{children:(0,v.jsxs)(m,{href:b(e),onClick:t,webBehavior:"new-tab",className:"font-base whitespace-nowrap overflow-hidden transition-colors ease-in-out rounded-lg px-3 h-9 flex gap-2 items-center hover:bg-bg-200 text-muted",children:[s,(0,v.jsx)(p,{name:"Lock",size:"sm"}),(0,v.jsx)(n,{variant:"neutral",size:"xs",children:(0,v.jsx)(f,{defaultMessage:"Enterprise",id:"CDLJ0Wjq0x"})}),(0,v.jsx)("span",{className:"sr-only",children:(0,v.jsx)(f,{defaultMessage:"(opens in new tab)",id:"yZs9WUVaoC"})})]})}):null});function E(){return(0,v.jsx)(L,{surface:"groups_nav",label:(0,v.jsx)(f,{defaultMessage:"Groups",id:"hzmswIqs+i"})})}function G(){return(0,v.jsx)(L,{surface:"analytics_chat",label:(0,v.jsx)(f,{defaultMessage:"Analytics Chat",id:"corudiYNBg"})})}export{C as a,U as i,z as n,S as o,E as r,G as t};