import{j as o}from"./jsx-runtime-CnH95YSl.js";import{i as t}from"./iconUtils-BII10A1q.js";import{O as T}from"./OdysseyStorybookThemeDecorator-BuDiOG2V.js";import{M as V,v as l,m as d}from"./BaseMenuButton-BIietjUB.js";import{u as N,h as C,N as U}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as W}from"./index-NdkWRN8K.js";import{M as E}from"./UserProfile-B6GSEZPs.js";import{M as a}from"./Box-1mvP3NLW.js";import{g as R,c as u}from"./Typography-Cz6D417Y.js";import{M as g}from"./Link-BDoLypER.js";import{M as w}from"./User-CyxEAfVT.js";import"./index-DB8HwIVZ.js";import"./Server-Ch5aeRtt.js";import"./List-UlX1tusJ.js";import"./ArrowRight-ChWYjNny.js";import"./Bug-CQIUmZ-N.js";import"./Calendar-_GPHtaRa.js";import"./ChevronRight-C12ToI7Y.js";import"./ChevronUp-CfT7Bz8X.js";import"./Clock-17ua7UAW.js";import"./Upload-CfzP_Muq.js";import"./Documentation-DF3oo39e.js";import"./Download-Zlhupksh.js";import"./ExternalLink-D0l1c5Cz.js";import"./Filter-DsDJ7si-.js";import"./Folder-e-po0U54.js";import"./Globe-B83Xmd05.js";import"./Grid-EpV3TL4a.js";import"./Group-mTVRC79V.js";import"./Hide-TKfOHglI.js";import"./Home-la7Lmt_L.js";import"./InformationCircle-a2jMUKfL.js";import"./More-DLQ2RjWn.js";import"./Refresh-DexPEklu.js";import"./Search-C5TVrLyE.js";import"./Settings-2rTKyez8.js";import"./Show-BnmQFsN6.js";import"./Sync-BbqTDeWk.js";import"./Video-DWT3WylB.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-qIn9QVYS.js";import"./useUniqueId-Bsgqe1tm.js";import"./createUniqueId-ByTaVY63.js";import"./BaseButton-DYZHKnV3.js";import"./MuiPropsContext-DhRylJZk.js";import"./Tooltip-CsVWtVfL.js";import"./Tooltip-Cq2rQGbD.js";import"./Grow-C8kUeGCY.js";import"./utils-kUZVaD1e.js";import"./inheritsLoose-CJ6Ie9dp.js";import"./index-B5xazMy1.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./index-DieBXP3Z.js";import"./TransitionGroupContext-DAL84N7p.js";import"./useIsFocusVisible-DH0qxT5e.js";import"./getReactElementRef-DsIevm5t.js";import"./resolveComponentProps-DXQ8X87i.js";import"./isHostComponent-DVu5iVWx.js";import"./useControlled-NQulfz4l.js";import"./Popper-BARIxJrI.js";import"./popper-BVOCD5jc.js";import"./ownerDocument-DW-IO8s5.js";import"./Portal-C6D59xAE.js";import"./Button-BzIwUmSM.js";import"./ButtonBase-BNqa2TMD.js";import"./assertThisInitialized-B9jnkVVz.js";import"./MenuContext-DKMyPMNY.js";import"./Menu-K9lpVvDG.js";import"./ownerWindow-HkKU3E4x.js";import"./debounce-Be36O1Ab.js";import"./Modal-CSDyCVCf.js";import"./getScrollbarSize-Bqq2hMjQ.js";import"./createChainedFunction-BO_9K8Jh.js";import"./Fade-dUgBN8rJ.js";import"./Paper-D-_O-EjU.js";import"./MenuList-BMOesnfs.js";import"./List-CmjR1pNu.js";import"./Box-BcMTQ_R2.js";import"./createBox-Dxawkfow.js";import"./Typography-ClQ35Rr-.js";import"./Link-DNIf0luC.js";/*!
 * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
 * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
 *
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * See the License for the specific language governing permissions and limitations under the License.
 */const H=C("div",{shouldForwardProp:e=>e!=="odysseyDesignTokens"})(({odysseyDesignTokens:e})=>({button:{height:"unset",paddingBlock:e.Spacing2,textAlign:"unset"}})),_=({profileIcon:e,orgName:r,translate:k,userNameEndIcon:P,userName:S,...O})=>{const z=N();return o.jsx(H,{odysseyDesignTokens:z,children:o.jsx(V,{...O,buttonChildren:o.jsx(E,{orgName:r,profileIcon:e,translate:k,userName:S,userNameEndIcon:P??o.jsx(U,{})}),buttonVariant:"floating",omitEndIcon:!0})})},c=W.memo(_);c.displayName="UserProfileMenuButton";const i=({children:e})=>{const r=N();return o.jsx(a,{sx:{marginBottom:r.Spacing4},children:e})},fe={component:c,decorators:[T],tags:["autodocs"],argTypes:{hasVerticalDivider:{control:{type:"boolean"},description:"Add a vertical rule to divide the button from surrounding content",table:{type:{summary:"boolean"}}},profileIcon:{control:{type:"select"},options:Object.keys(t),mapping:t,description:"An optional icon to display ahead of the user profile",table:{type:{summary:"<Icon />"}}},userName:{control:"text",description:"Org name of the logged in user",table:{type:{summary:"string"}}},orgName:{control:"text",description:"Org name of the logged in user",table:{type:{summary:"string"}}},userNameEndIcon:{control:{type:"select"},options:Object.keys(t),mapping:t,description:"An optional icon to display at the end of the user profile",table:{type:{summary:"<Icon />"}}},menuAlignment:{options:d,control:{type:"radio"},description:"The horizontal alignment of the popover.",table:{type:{summary:d.join(" | ")},defaultValue:{summary:"left"}}},popoverContent:{control:"object",description:"The content to appear in the popover",table:{type:{summary:"[ReactNode | NullElement]"}},type:{required:!0,name:"other",value:"[ReactNode]"}},verticalDividerAlignment:{options:l,control:{type:"radio"},description:"Show vertical rule before or after the button",table:{type:{summary:l.join(" | ")},defaultValue:{summary:"start"}}}},args:{userName:"test.user@test.com",orgName:"ORG123",profileIcon:o.jsx(w,{}),menuAlignment:"left",popoverContent:o.jsxs(a,{sx:{minWidth:"392px"},children:[o.jsx(i,{children:o.jsx(R,{children:"Add-Min O'Cloudy Tud"})}),o.jsxs(i,{children:[o.jsx(u,{children:"administrator1@clouditude.net"}),o.jsx(u,{children:"rain.okta1.com"})]}),o.jsx(i,{children:o.jsx(g,{href:"#",children:"My Settings"})}),o.jsx(i,{children:o.jsx(g,{href:"#",children:"Sign Out"})})]})}},n={},s={args:{menuAlignment:"right"},render:function(r){return o.jsx(a,{sx:{ml:"500px"},children:o.jsx(c,{...r})})}},m={args:{profileIcon:void 0}},p={args:{hasVerticalDivider:!0}};var h,y,f;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:"{}",...(f=(y=n.parameters)==null?void 0:y.docs)==null?void 0:f.source}}};var x,j,M;s.parameters={...s.parameters,docs:{...(x=s.parameters)==null?void 0:x.docs,source:{originalSource:`{
  args: {
    menuAlignment: "right"
  },
  render: function C(props: UserProfileMenuButtonProps) {
    return <Box sx={{
      ml: "500px"
    }}>
        <UserProfileMenuButton {...props} />
      </Box>;
  }
}`,...(M=(j=s.parameters)==null?void 0:j.docs)==null?void 0:M.source}}};var v,b,D;m.parameters={...m.parameters,docs:{...(v=m.parameters)==null?void 0:v.docs,source:{originalSource:`{
  args: {
    profileIcon: undefined
  }
}`,...(D=(b=m.parameters)==null?void 0:b.docs)==null?void 0:D.source}}};var B,A,I;p.parameters={...p.parameters,docs:{...(B=p.parameters)==null?void 0:B.docs,source:{originalSource:`{
  args: {
    hasVerticalDivider: true
  }
}`,...(I=(A=p.parameters)==null?void 0:A.docs)==null?void 0:I.source}}};const xe=["Default","WithRightPopoverAlignment","WithoutProfileIcon","WithVerticalDivider"];export{n as Default,s as WithRightPopoverAlignment,p as WithVerticalDivider,m as WithoutProfileIcon,xe as __namedExportsOrder,fe as default};
