import{j as a}from"./jsx-runtime-CnH95YSl.js";import{f as sa,w as na,u as T,e as ta}from"./index-BJMTVygn.js";import{a as oa}from"./axeRun-B-LchFqf.js";import{i as S}from"./iconUtils-BII10A1q.js";import{O as ca}from"./OdysseyStorybookThemeDecorator-BuDiOG2V.js";import{M as e}from"./Tag-DwH0t814.js";import{M as ia}from"./TagList-BZGEhGXn.js";import{M as la}from"./Group-mTVRC79V.js";import"./index-NdkWRN8K.js";import"./_commonjsHelpers-gnU0ypJ3.js";import"./axe-4JP0vCEZ.js";import"./index-DB8HwIVZ.js";import"./OdysseyThemeProvider-Bh0Bu-2o.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"./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"./User-CyxEAfVT.js";import"./Video-DWT3WylB.js";import"./index-BJTM6NaI.js";import"./OdysseyProvider-qIn9QVYS.js";import"./MuiPropsContext-DhRylJZk.js";import"./Chip-CXnMieIl.js";import"./createSvgIcon-ClUWwDzL.js";import"./useIsFocusVisible-DH0qxT5e.js";import"./ButtonBase-BNqa2TMD.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-CJ6Ie9dp.js";import"./TransitionGroupContext-DAL84N7p.js";import"./Stack-B7OGvu7C.js";import"./createStyled-D6bTcpHC.js";import"./useThemeProps-DwvbKxez.js";const le={component:e,decorators:[ca],parameters:{actions:{argTypesRegex:null}},tags:["autodocs"],argTypes:{icon:{control:{type:"select"},options:Object.keys(S),mapping:S,description:"An optional icon to display alongside the label",table:{type:{summary:"<Icon />"}}},isDisabled:{control:"boolean",description:"If `true`, the tag is disabled",table:{type:{summary:"boolean"},defaultValue:{summary:"false"}}},label:{control:"text",description:"The label text for the tag",table:{type:{summary:"string"}},type:{required:!0,name:"string"}},onClick:{control:"object",action:!0,description:"Callback fired when the tag is clicked",table:{type:{summary:"func"}}},onRemove:{control:"object",action:!0,description:"Callback fired when the remove button of the tag is clicked",table:{type:{summary:"func"}}},colorVariant:{control:{type:"select"},options:["default","info","accentOne","accentTwo","accentThree","accentFour"],description:"The color of the tag",table:{type:{summary:"string"},defaultValue:{summary:"default"}}},size:{control:{type:"select"},options:["default","small"],description:"The size of the tag",table:{type:{summary:"string"},defaultValue:{summary:"default"}}}},args:{label:"Starship",colorVariant:"default",onClick:sa(),size:"medium"}},n={args:{label:"Starship"}},c={args:{label:"Starship",colorVariant:"info"}},i={args:{label:"Starship",colorVariant:"accentOne"}},l={args:{label:"Starship",colorVariant:"accentTwo"}},m={args:{label:"Starship",colorVariant:"accentThree"}},p={args:{label:"Starship",colorVariant:"accentFour"}},u={render:function(t){return a.jsxs(ia,{children:[a.jsx(e,{label:t.label}),a.jsx(e,{colorVariant:"info",label:"Info tag"}),a.jsx(e,{colorVariant:"accentOne",label:"AccentOne tag"}),a.jsx(e,{colorVariant:"accentTwo",label:"AccentTwo tag"}),a.jsx(e,{colorVariant:"accentThree",label:"AccentThree tag"}),a.jsx(e,{colorVariant:"accentFour",label:"AccentFour tag"})]})},args:{label:"Default tag"}},g={args:{label:"Starship",size:"small"}},d={args:{label:"Crew",icon:a.jsx(la,{})}},b={args:{label:"Starship"},play:async({args:r,canvasElement:t,step:y})=>{await y("click the tag",async()=>{const s=na(t).getByText(r.label);await T.click(s),ta(r.onClick).toHaveBeenCalledTimes(1),await oa("Clickable Tag")})}},h={args:{label:"Starship"},play:async({args:r,canvasElement:t,step:y})=>{await y("remove the tag on click",async()=>{const o=t.querySelector('[role="button"]'),s=o==null?void 0:o.querySelector("svg");s&&(await T.click(s),await T.tab(),await ta(r.onRemove).toHaveBeenCalled()),await oa("Removable Tag")})}},f={args:{label:"Starship",isDisabled:!0}};var v,w,V;n.parameters={...n.parameters,docs:{...(v=n.parameters)==null?void 0:v.docs,source:{originalSource:`{
  args: {
    label: "Starship"
  }
}`,...(V=(w=n.parameters)==null?void 0:w.docs)==null?void 0:V.source}}};var x,k,C;c.parameters={...c.parameters,docs:{...(x=c.parameters)==null?void 0:x.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    colorVariant: "info"
  }
}`,...(C=(k=c.parameters)==null?void 0:k.docs)==null?void 0:C.source}}};var A,I,j;i.parameters={...i.parameters,docs:{...(A=i.parameters)==null?void 0:A.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    colorVariant: "accentOne"
  }
}`,...(j=(I=i.parameters)==null?void 0:I.docs)==null?void 0:j.source}}};var O,R,E;l.parameters={...l.parameters,docs:{...(O=l.parameters)==null?void 0:O.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    colorVariant: "accentTwo"
  }
}`,...(E=(R=l.parameters)==null?void 0:R.docs)==null?void 0:E.source}}};var D,F,z;m.parameters={...m.parameters,docs:{...(D=m.parameters)==null?void 0:D.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    colorVariant: "accentThree"
  }
}`,...(z=(F=m.parameters)==null?void 0:F.docs)==null?void 0:z.source}}};var B,M,q;p.parameters={...p.parameters,docs:{...(B=p.parameters)==null?void 0:B.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    colorVariant: "accentFour"
  }
}`,...(q=(M=p.parameters)==null?void 0:M.docs)==null?void 0:q.source}}};var L,H,G;u.parameters={...u.parameters,docs:{...(L=u.parameters)==null?void 0:L.docs,source:{originalSource:`{
  render: function C(args) {
    return <TagList>
        <Tag label={args.label} />
        <Tag colorVariant="info" label="Info tag" />
        <Tag colorVariant="accentOne" label="AccentOne tag" />
        <Tag colorVariant="accentTwo" label="AccentTwo tag" />
        <Tag colorVariant="accentThree" label="AccentThree tag" />
        <Tag colorVariant="accentFour" label="AccentFour tag" />
      </TagList>;
  },
  args: {
    label: "Default tag"
  }
}`,...(G=(H=u.parameters)==null?void 0:H.docs)==null?void 0:G.source}}};var _,J,K;g.parameters={...g.parameters,docs:{...(_=g.parameters)==null?void 0:_.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    size: "small"
  }
}`,...(K=(J=g.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};var N,P,Q;d.parameters={...d.parameters,docs:{...(N=d.parameters)==null?void 0:N.docs,source:{originalSource:`{
  args: {
    label: "Crew",
    icon: <GroupIcon />
  }
}`,...(Q=(P=d.parameters)==null?void 0:P.docs)==null?void 0:Q.source}}};var U,W,X;b.parameters={...b.parameters,docs:{...(U=b.parameters)==null?void 0:U.docs,source:{originalSource:`{
  args: {
    label: "Starship"
  },
  play: async ({
    args,
    canvasElement,
    step
  }) => {
    await step("click the tag", async () => {
      const canvas = within(canvasElement);
      const tag = canvas.getByText(args.label);
      await userEvent.click(tag);
      expect(args.onClick).toHaveBeenCalledTimes(1);
      await axeRun("Clickable Tag");
    });
  }
}`,...(X=(W=b.parameters)==null?void 0:W.docs)==null?void 0:X.source}}};var Y,Z,$;h.parameters={...h.parameters,docs:{...(Y=h.parameters)==null?void 0:Y.docs,source:{originalSource:`{
  args: {
    label: "Starship"
  },
  play: async ({
    args,
    canvasElement,
    step
  }) => {
    await step("remove the tag on click", async () => {
      const tagElement = canvasElement.querySelector('[role="button"]');
      const removeIcon = tagElement?.querySelector("svg");
      if (removeIcon) {
        await userEvent.click(removeIcon);
        await userEvent.tab();
        await expect(args.onRemove).toHaveBeenCalled();
      }
      await axeRun("Removable Tag");
    });
  }
}`,...($=(Z=h.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var aa,ea,ra;f.parameters={...f.parameters,docs:{...(aa=f.parameters)==null?void 0:aa.docs,source:{originalSource:`{
  args: {
    label: "Starship",
    isDisabled: true
  }
}`,...(ra=(ea=f.parameters)==null?void 0:ea.docs)==null?void 0:ra.source}}};const me=["Default","Info","AccentOne","AccentTwo","AccentThree","AccentFour","List","Small","Icon","Clickable","Removable","Disabled"];export{p as AccentFour,i as AccentOne,m as AccentThree,l as AccentTwo,b as Clickable,n as Default,f as Disabled,d as Icon,c as Info,u as List,h as Removable,g as Small,me as __namedExportsOrder,le as default};
