import{r as e,j as t}from"./vendor-react-Dp9pL_Wn.js";import{cT as n,cU as r,hi as a,hs as i}from"./c6eedc03a-CsEFTfjy.js";import{u as o}from"./vendor-intl-D2wGIp4M.js";import{JL as s}from"./index-DhMXk6CR.js";import{m}from"./vendor-ant-cds-bBedrtIN.js";function l(){const e=i(),t=n(r.OwnersManage),a=n(r.MembersManage);return e&&(t||a)}function d(){const t=o();return e.useMemo(()=>({user:{value:"user",label:t.formatMessage({defaultMessage:"User",id:"EwRIOmjuqR"}),description:t.formatMessage({defaultMessage:"Can create chats",id:"V1xV3xRuDo"})},membershipAdmin:{value:"membership_admin",label:t.formatMessage({defaultMessage:"Admin",id:"iHN12uxiqf"}),description:t.formatMessage({defaultMessage:"Can manage user membership",id:"s+lL3TYjLp"})},owner:{value:"owner",label:t.formatMessage({defaultMessage:"Owner",id:"zINlaoBlL/"}),description:t.formatMessage({defaultMessage:"Can manage user roles and organization settings",id:"gmqgos5sJs"})},primaryOwner:{value:"primary_owner",label:t.formatMessage({defaultMessage:"Primary owner",id:"NXBWjcGhIs"}),description:t.formatMessage({defaultMessage:"Can manage org and data settings",id:"n+urWme5N2"})},managed:{value:"managed",label:t.formatMessage({defaultMessage:"Custom",id:"Sjo1P44FYy"}),description:t.formatMessage({defaultMessage:"Can access features from custom roles assigned by group membership",id:"zg6yp5A84z"})}}),[t])}function c(){const t=d(),n=l();return e.useMemo(()=>{const e=[...n?[t.managed]:[],t.user,t.membershipAdmin,t.owner,t.primaryOwner];return Object.fromEntries(e.map(e=>[e.value,e.label]))},[t.user,t.membershipAdmin,t.owner,t.primaryOwner,t.managed,n])}function u({value:i,onSelect:c,disabled:u,className:g,label:f,matchWidth:b,allowPrimaryOwnerSelection:k,rolesLockedByProvisioning:x}){const w=o(),y=d(),h=n(r.MembershipAdminsManage),v=n(r.OwnersManage),M=l(),j=a(),z="primary_owner"===j?.role,A=w.formatMessage({defaultMessage:"Managed by your SSO Identity Provider",id:"AHkzQ+FqjJ"}),O=e=>x?{...e,disabled:!0,description:A}:e,C=e.useMemo(()=>[...M?[O(y.managed)]:[],O(y.user),...h?[O(y.membershipAdmin)]:[],...v?[O(y.owner)]:[],...z&&k?[y.primaryOwner]:[]],[y,M,h,v,z,k,x]),P=s(),_=e.useCallback(e=>{e&&c(e)},[c]);return t.jsx(p,{label:f,children:t.jsx(m,{mode:"select",size:"sm",searchable:!1,fullWidth:b??!1,items:C,value:i,onChange:_,disabled:u,placeholder:P[i]??i.replace("_"," "),className:g,popupClassName:b?void 0:"min-w-72"})})}function p({label:e,children:n}){return e?t.jsxs("label",{className:"flex flex-col gap-sm",children:[t.jsx("span",{className:"text-footnote text-secondary",children:e}),n]}):t.jsx(t.Fragment,{children:n})}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var g={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}};const f=Object.freeze(Object.defineProperty({__proto__:null,conf:g,language:{defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}},Symbol.toStringTag,{value:"Module"}));export{u as R,p as S,l as a,f as c,c as u};
