import{j as e}from"./iframe-B8FSoBNY.js";import{M as r,a as g,f as I,c as f,d as M,g as h}from"./menu-item-CrqDaj9K.js";import{S as x}from"./star-CvcHIXRa.js";import{C as u}from"./chevron-right-owK1wZnx.js";import{F as b}from"./file-text-D5m8MJlG.js";import{B as S}from"./button-C7it2n8t.js";import{C as v}from"./chevron-down-BYCAGyCV.js";import{F as L}from"./folder-C5dba_Co.js";import{S as j}from"./settings-DUgg22A7.js";import{B as C}from"./index-B0y2_lLF.js";import{S as R}from"./stack-CN4X31TA.js";import"./preload-helper-PPVm8Dsz.js";import"./compiler-runtime-BXE7OOXE.js";import"./tooltip-DZxUoouw.js";import"./portal-CZHfPTRw.js";import"./index-DaXC_qY_.js";import"./index-DpB4ozcR.js";import"./normalize-props-D7NI5JRu.js";import"./factory-BR3bc_RM.js";import"./tooltip-C_a-XGZ8.js";import"./create-slot-recipe-context-DAhDE6G_.js";import"./factory-DAJZwK4o.js";import"./create-recipe-context-BU56IzEo.js";import"./use-presence-context-DK2PGZth.js";import"./create-split-props-u5h9OPvL.js";import"./computed-style-C0hzrq9-.js";import"./overflow-CkG1DOya.js";import"./index-cFwdnc0b.js";import"./icons-WRA1cA-W.js";import"./tabbable-DHAf8oAu.js";import"./typeahead-CuY9WxfQ.js";import"./mutation-observer-CAfGweIM.js";import"./dismissable-layer-Cc5dFRd8.js";import"./icon-C8FN9JqD.js";import"./flex-DAJL4AFZ.js";import"./badge-CtgJasjB.js";import"./createLucideIcon-CcBBUKX8.js";import"./spinner-ZYH_gvW-.js";import"./index-CXwl6T4k.js";const ue={title:"Components/MenuItem",component:r,decorators:[n=>e.jsx(C,{padding:"sm",background:"bg",children:e.jsx(n,{})})],args:{id:"reports",primaryLabel:"Reports",secondaryLabel:"Financial and tax summaries",tooltipLabel:"Open reports",leftIcon:b,rightIcon:u}},y=n=>e.jsx(g,{children:e.jsx(R,{width:"20rem",gap:"2px",padding:"sm",borderRadius:"md",borderWidth:"1px",borderColor:"border.muted",background:"bg",children:n})}),a=n=>y(e.jsx(r,{...n})),t={render:a},o={args:{tagLabel:"WIP",tagColorPalette:"yellow"},render:a},s={args:{isSelected:!0,rightIcon:x},render:a},i={args:{primaryLabel:"Activity log",secondaryLabel:"Latest updates",leftIcon:null,rightIcon:null},render:a},c={args:{primaryLabel:"Invoices",secondaryLabel:void 0,tooltipLabel:void 0},render:a},d={args:{variant:"compact",secondaryLabel:"Financial and tax summaries"},render:a},l={args:{isDisabled:!0,secondaryLabel:"Requires admin access"},render:a},m={render:()=>y(e.jsxs(e.Fragment,{children:[e.jsx(r,{id:"files",primaryLabel:"Files",secondaryLabel:"Recent uploads",leftIcon:L}),e.jsx(r,{id:"reports",primaryLabel:"Reports",secondaryLabel:"Financial and tax summaries",leftIcon:b,rightIcon:u}),e.jsx(r,{id:"activity",primaryLabel:"Activity log",secondaryLabel:"Latest updates",leftIcon:null,rightIcon:null}),e.jsx(r,{id:"settings",primaryLabel:"Settings",secondaryLabel:"Workspace preferences",isSelected:!0}),e.jsx(r,{id:"locked",primaryLabel:"Billing",secondaryLabel:"Requires admin access",isDisabled:!0})]}))},p={render:()=>e.jsxs(g,{defaultOpen:!0,children:[e.jsx(I,{asChild:!0,children:e.jsx(S,{size:"sm",variant:"outline",children:"Actions"})}),e.jsx(f,{children:e.jsxs(M,{minW:"240px",bg:"bg",children:[e.jsx(r,{id:"sort",primaryLabel:"Sort by",secondaryLabel:"Newest first",tooltipLabel:"Change sort order",leftIcon:v}),e.jsx(r,{id:"duplicate",primaryLabel:"Duplicate",secondaryLabel:"Create a copy",leftIcon:b}),e.jsx(r,{id:"move",primaryLabel:"Move to folder",secondaryLabel:"Organize this item",leftIcon:L,rightIcon:u}),e.jsx(h,{}),e.jsx(r,{id:"settings",primaryLabel:"Settings",secondaryLabel:void 0,leftIcon:j}),e.jsx(r,{id:"archive",primaryLabel:"Archive",secondaryLabel:"Requires admin access",isDisabled:!0})]})})]})};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
  render: renderMenuItem
}`,...t.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
  args: {
    tagLabel: "WIP",
    tagColorPalette: "yellow"
  },
  render: renderMenuItem
}`,...o.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
  args: {
    isSelected: true,
    rightIcon: Star
  },
  render: renderMenuItem
}`,...s.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
  args: {
    primaryLabel: "Activity log",
    secondaryLabel: "Latest updates",
    leftIcon: null,
    rightIcon: null
  },
  render: renderMenuItem
}`,...i.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
  args: {
    primaryLabel: "Invoices",
    secondaryLabel: undefined,
    tooltipLabel: undefined
  },
  render: renderMenuItem
}`,...c.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
  args: {
    variant: "compact",
    secondaryLabel: "Financial and tax summaries"
  },
  render: renderMenuItem
}`,...d.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
  args: {
    isDisabled: true,
    secondaryLabel: "Requires admin access"
  },
  render: renderMenuItem
}`,...l.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
  render: () => renderMenuList(<>
        <MenuItem id="files" primaryLabel="Files" secondaryLabel="Recent uploads" leftIcon={Folder} />
        <MenuItem id="reports" primaryLabel="Reports" secondaryLabel="Financial and tax summaries" leftIcon={FileText} rightIcon={ChevronRight} />
        <MenuItem id="activity" primaryLabel="Activity log" secondaryLabel="Latest updates" leftIcon={null} rightIcon={null} />
        <MenuItem id="settings" primaryLabel="Settings" secondaryLabel="Workspace preferences" isSelected />
        <MenuItem id="locked" primaryLabel="Billing" secondaryLabel="Requires admin access" isDisabled />
      </>)
}`,...m.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
  render: () => <Menu.Root defaultOpen>
      <Menu.Trigger asChild>
        <Button size="sm" variant="outline">
          Actions
        </Button>
      </Menu.Trigger>
      <Menu.Positioner>
        <Menu.Content minW="240px" bg="bg">
          <MenuItem id="sort" primaryLabel="Sort by" secondaryLabel="Newest first" tooltipLabel="Change sort order" leftIcon={ChevronDown} />
          <MenuItem id="duplicate" primaryLabel="Duplicate" secondaryLabel="Create a copy" leftIcon={FileText} />
          <MenuItem id="move" primaryLabel="Move to folder" secondaryLabel="Organize this item" leftIcon={Folder} rightIcon={ChevronRight} />
          <Menu.Separator />
          <MenuItem id="settings" primaryLabel="Settings" secondaryLabel={undefined} leftIcon={Settings} />
          <MenuItem id="archive" primaryLabel="Archive" secondaryLabel="Requires admin access" isDisabled />
        </Menu.Content>
      </Menu.Positioner>
    </Menu.Root>
}`,...p.parameters?.docs?.source}}};const be=["Default","WithTag","Selected","NoIcon","NoDescription","Compact","Disabled","MenuList","DropdownMenu"];export{d as Compact,t as Default,l as Disabled,p as DropdownMenu,m as MenuList,c as NoDescription,i as NoIcon,s as Selected,o as WithTag,be as __namedExportsOrder,ue as default};
