import{r as c,j as s}from"./vendor-react-wBh_31cN.js";import{u as i}from"./useCopyToClipboard-DfzwgDFE.js";import{G as l,ds as o,dt as t,bk as a,p,du as d}from"./index-dNe6i2rS.js";import{aj as u,bp as x,X as f}from"./vendor-icons-BUUmD6ht.js";const h=({password:e})=>{const[r,n]=c.useState(!1),{copyToClipboard:m}=i();return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("span",{className:"text-xs font-medium",children:"Password"})}),s.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:r?e:"•".repeat(e.length)}),s.jsx("button",{type:"button",className:"text-quartz-gray hover:text-foreground",onClick:()=>m(e,{successTitle:"Password copied"}),children:s.jsx(u,{className:"size-3.5"})})]}),s.jsxs(l,{variant:"outline",size:"sm",className:"mt-1 w-fit",onClick:()=>n(!r),children:[r?s.jsx(x,{}):s.jsx(f,{}),r?"Hide password":"Reveal password"]})]})},y="ANY",w=e=>e?e.map(r=>({value:r.groupName,label:o[r.groupName]})):[],R=e=>e?e.map(r=>o[r.groupName]):[],g=e=>p(e,d(o)),C=e=>o[e],P=e=>!e||e==="Hopsworks"?a.M_ACCOUNT_TYPE:a.REMOTE_ACCOUNT_TYPE,U=e=>{if(!(!e||e==="Hopsworks"))return e==="OAuth2"?t.OAUTH2:e==="LDAP"?t.LDAP:t.KRB};export{h as P,y as a,P as b,R as c,C as d,g as f,w as g,U as r};
