import{j as n}from"./jsx-runtime-CnH95YSl.js";import{w as l,e as a}from"./index-BJMTVygn.js";import{O as A}from"./OdysseyStorybookThemeDecorator-BuDiOG2V.js";import{M as r}from"./AppSwitcher-cyyPttJv.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./OdysseyThemeProvider-Bh0Bu-2o.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-qIn9QVYS.js";import"./uiShellSharedConstants-DD9UP82e.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"./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"./Skeleton-BPjIT6NG.js";import"./colorManipulator-DKifQsuo.js";const X={component:r,decorators:[A],parameters:{layout:"fullscreen"},argTypes:{appIcons:{description:"",table:{type:{summary:"Array<AppSwitcherAppIcon>"}}},isLoading:{control:"boolean"},selectedAppName:{description:"The App Instance app name that the UI is on",control:"text"}},args:{appIcons:[]}},o={args:{appIcons:[{appIconDefaultUrl:"/AppSwitcher/admin-app-default.svg",appIconSelectedUrl:"/AppSwitcher/admin-app-selected.svg",appName:"saasure",label:"Admin Dashboard",linkUrl:"http://rain-admin.okta1.com:1802/admin/dashboard"},{appIconDefaultUrl:"/AppSwitcher/okta-dashboard-default.svg",appIconSelectedUrl:"/AppSwitcher/okta-dashboard-selected.svg",appName:"okta_enduser",label:"Okta Dashboard",linkUrl:"http://rain.okta1.com:1802/app/UserHome"},{appIconDefaultUrl:"/AppSwitcher/workflows-default.svg",appIconSelectedUrl:"/AppSwitcher/workflows-selected.svg",appName:"okta_flow_sso",label:"Okta Workflows",linkUrl:"http://rain-admin.okta1.com:1802/flow/go"}],isLoading:!1,selectedAppName:"saasure"},render:t=>n.jsx("div",{style:{height:"100vh"},children:n.jsx(r,{...t})}),play:async({canvasElement:t,step:s})=>{const e=l(t);await s("App switcher shows all items",async()=>{await a(e.getByRole("navigation")).toBeVisible(),await a(e.queryAllByRole("listitem")).toHaveLength(3),await a(e.queryAllByRole("link")).toHaveLength(3),await a(e.queryByRole("link",{name:"Admin Dashboard"})).toBeVisible(),await a(e.queryByRole("link",{name:"Okta Dashboard"})).toBeVisible(),await a(e.queryByRole("link",{name:"Okta Workflows"})).toBeVisible()})}},i={args:{appIcons:[],isLoading:!1,selectedAppName:"saasure"},render:t=>n.jsx("div",{style:{height:"100vh"},children:n.jsx(r,{...t})}),play:async({canvasElement:t,step:s})=>{const e=l(t);await s("App switcher shows no items, but is loaded",async()=>{await a(e.getByRole("navigation")).toBeVisible(),await a(e.queryAllByRole("listitem")).toHaveLength(0),await a(e.queryAllByRole("link")).toHaveLength(0)})}},p={args:{appIcons:[],isLoading:!0,selectedAppName:"saasure"},render:t=>n.jsx("div",{style:{height:"100vh"},children:n.jsx(r,{...t})}),play:async({canvasElement:t,step:s})=>{const e=l(t);await s("App switcher shows no items, but is loaded",async()=>{await a(e.getByRole("navigation")).toBeVisible(),await a(e.queryAllByRole("listitem")).toHaveLength(3),await a(e.queryAllByRole("link")).toHaveLength(0)})}};var c,m,d;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`{
  args: {
    appIcons: [{
      appIconDefaultUrl: "/AppSwitcher/admin-app-default.svg",
      appIconSelectedUrl: "/AppSwitcher/admin-app-selected.svg",
      appName: "saasure",
      label: "Admin Dashboard",
      linkUrl: "http://rain-admin.okta1.com:1802/admin/dashboard"
    }, {
      appIconDefaultUrl: "/AppSwitcher/okta-dashboard-default.svg",
      appIconSelectedUrl: "/AppSwitcher/okta-dashboard-selected.svg",
      appName: "okta_enduser",
      label: "Okta Dashboard",
      linkUrl: "http://rain.okta1.com:1802/app/UserHome"
    }, {
      appIconDefaultUrl: "/AppSwitcher/workflows-default.svg",
      appIconSelectedUrl: "/AppSwitcher/workflows-selected.svg",
      appName: "okta_flow_sso",
      label: "Okta Workflows",
      linkUrl: "http://rain-admin.okta1.com:1802/flow/go"
    }],
    isLoading: false,
    selectedAppName: "saasure"
  },
  render: props => {
    return <div style={{
      height: "100vh"
    }}>
        <AppSwitcher {...props} />
      </div>;
  },
  play: async ({
    canvasElement,
    step
  }) => {
    const canvas = within(canvasElement);
    await step("App switcher shows all items", async () => {
      await expect(canvas.getByRole("navigation")).toBeVisible();
      await expect(canvas.queryAllByRole("listitem")).toHaveLength(3);
      await expect(canvas.queryAllByRole("link")).toHaveLength(3);
      await expect(canvas.queryByRole("link", {
        name: "Admin Dashboard"
      })).toBeVisible();
      await expect(canvas.queryByRole("link", {
        name: "Okta Dashboard"
      })).toBeVisible();
      await expect(canvas.queryByRole("link", {
        name: "Okta Workflows"
      })).toBeVisible();
    });
  }
}`,...(d=(m=o.parameters)==null?void 0:m.docs)==null?void 0:d.source}}};var h,w,y;i.parameters={...i.parameters,docs:{...(h=i.parameters)==null?void 0:h.docs,source:{originalSource:`{
  args: {
    appIcons: [],
    isLoading: false,
    selectedAppName: "saasure"
  },
  render: props => {
    return <div style={{
      height: "100vh"
    }}>
        <AppSwitcher {...props} />
      </div>;
  },
  play: async ({
    canvasElement,
    step
  }) => {
    const canvas = within(canvasElement);
    await step("App switcher shows no items, but is loaded", async () => {
      await expect(canvas.getByRole("navigation")).toBeVisible();
      await expect(canvas.queryAllByRole("listitem")).toHaveLength(0);
      await expect(canvas.queryAllByRole("link")).toHaveLength(0);
    });
  }
}`,...(y=(w=i.parameters)==null?void 0:w.docs)==null?void 0:y.source}}};var v,u,g;p.parameters={...p.parameters,docs:{...(v=p.parameters)==null?void 0:v.docs,source:{originalSource:`{
  args: {
    appIcons: [],
    isLoading: true,
    selectedAppName: "saasure"
  },
  render: props => {
    return <div style={{
      height: "100vh"
    }}>
        <AppSwitcher {...props} />
      </div>;
  },
  play: async ({
    canvasElement,
    step
  }) => {
    const canvas = within(canvasElement);
    await step("App switcher shows no items, but is loaded", async () => {
      await expect(canvas.getByRole("navigation")).toBeVisible();
      await expect(canvas.queryAllByRole("listitem")).toHaveLength(3);
      await expect(canvas.queryAllByRole("link")).toHaveLength(0);
    });
  }
}`,...(g=(u=p.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};const Y=["AllApps","NoApps","Loading"];export{o as AllApps,p as Loading,i as NoApps,Y as __namedExportsOrder,X as default};
