import{j as e}from"./jsx-runtime-CnH95YSl.js";import{h as K,N as Q}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{a as W}from"./index-B-lxVbXh.js";import{r as u}from"./index-NdkWRN8K.js";import{O as X}from"./OdysseyStorybookThemeDecorator-BuDiOG2V.js";import{c as Y,M as C}from"./Card-C0RGIer3.js";import{M as b}from"./MenuItem-CmSG6PNu.js";import{M as Z}from"./Button-BEA5U6Tg.js";import{M as $}from"./Checkbox-DPv3Q9UW.js";import{I as ee}from"./IconButton-5qShmnSr.js";import{M as te}from"./ChevronUp-CfT7Bz8X.js";const v=e.jsx("img",{alt:"Example logo",src:"https://placehold.co/128"}),x=e.jsx(e.Fragment,{children:"Children."}),f=e.jsx(e.Fragment,{children:"Detail panel."}),m=W("onClick"),ne=e.jsx(Z,{label:"Access app",onClick:m,variant:"primary"}),oe=e.jsxs(e.Fragment,{children:[e.jsx(b,{onClick:m,children:"Action 1"}),e.jsx(b,{onClick:m,children:"Action 2"})]}),re=K("div")(()=>({"& label":{gap:0}})),ae={decorators:[X],argTypes:{children:{control:"boolean"},description:{control:"text"},detailPanel:{control:"boolean"},image:{control:"boolean"},isLoading:{control:"boolean"},overline:{control:"text"},title:{control:"text"},variant:{control:"select",options:Y},accessory:{control:"boolean"},button:{control:"boolean"},menuButtonChildren:{control:"boolean"},onClick:{control:"boolean"}},args:{accessory:!1,button:void 0,children:!1,description:"This is a description of the app. Descriptions should be concise, and truncation is handled by the consumer rather than the component, so if you write a novel, it will display a novel.",detailPanel:!1,image:void 0,isLoading:!1,menuButtonChildren:!1,onClick:void 0,overline:"Category",title:"App title",variant:"tile"},render:function(t){const[d,h]=u.useState(!1),[p,g]=u.useState(!1),V=u.useCallback(()=>{g(!p)},[p,g]),N=u.useCallback(()=>{h(!d)},[d,h]),R=({isChecked:n,onChange:o})=>e.jsx(re,{children:e.jsx($,{ariaLabel:"Selecton toggle",isChecked:n,onChange:o})}),U=({isExpanded:n,onToggle:o})=>e.jsx(ee,{"aria-label":n?"Collapse":"Expand",onClick:o,size:"small",children:n?e.jsx(Q,{}):e.jsx(te,{})}),q=({isExpandable:n,isSelected:o,isExpanded:G,onToggleExpansion:H,onChangeSelection:J})=>e.jsxs(e.Fragment,{children:[e.jsx(R,{isChecked:o,onChange:J}),n&&e.jsx(U,{isExpanded:G,onToggle:H})]});return t.onClick?e.jsx(C,{children:t.children?x:void 0,description:t.description,detailPanel:t.detailPanel?f:void 0,image:t.image?v:void 0,isLoading:t.isLoading,onClick:m,overline:t.overline,title:t.title,variant:t.variant}):e.jsx(C,{accessory:t.accessory?e.jsx(q,{isExpandable:!!t.detailPanel,isExpanded:d,isSelected:p,onChangeSelection:V,onToggleExpansion:N}):void 0,button:t.button?ne:void 0,children:t.children?x:void 0,description:t.description,detailPanel:t.detailPanel&&d?f:void 0,image:t.image?v:void 0,isLoading:t.isLoading,menuButtonChildren:t.menuButtonChildren?oe:void 0,overline:t.overline,title:t.title,variant:t.variant})}},r={args:{accessory:!1,button:!0,children:!1,detailPanel:!1,image:!0,menuButtonChildren:!0}},a={args:{image:!0,onClick:!0}},i={args:{accessory:!0,button:!0,children:!0,detailPanel:!0,image:!0,menuButtonChildren:!0,variant:"tile"}},s={args:{accessory:!0,button:!0,children:!0,detailPanel:!0,image:!0,menuButtonChildren:!0,variant:"stack"}},l={args:{accessory:!0,button:!0,children:!0,detailPanel:!0,image:!0,menuButtonChildren:!0,variant:"compact"}},c={args:{accessory:!0,button:!0,children:!0,detailPanel:!0,image:!0,isLoading:!0,menuButtonChildren:!0,variant:"tile"}};var y,j,S;r.parameters={...r.parameters,docs:{...(y=r.parameters)==null?void 0:y.docs,source:{originalSource:`{
  args: {
    accessory: false,
    button: true,
    children: false,
    detailPanel: false,
    image: true,
    menuButtonChildren: true
  }
}`,...(S=(j=r.parameters)==null?void 0:j.docs)==null?void 0:S.source}}};var k,P,B;a.parameters={...a.parameters,docs:{...(k=a.parameters)==null?void 0:k.docs,source:{originalSource:`{
  args: {
    image: true,
    onClick: true
  }
}`,...(B=(P=a.parameters)==null?void 0:P.docs)==null?void 0:B.source}}};var E,M,L;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`{
  args: {
    accessory: true,
    button: true,
    children: true,
    detailPanel: true,
    image: true,
    menuButtonChildren: true,
    variant: "tile"
  }
}`,...(L=(M=i.parameters)==null?void 0:M.docs)==null?void 0:L.source}}};var T,z,A;s.parameters={...s.parameters,docs:{...(T=s.parameters)==null?void 0:T.docs,source:{originalSource:`{
  args: {
    accessory: true,
    button: true,
    children: true,
    detailPanel: true,
    image: true,
    menuButtonChildren: true,
    variant: "stack"
  }
}`,...(A=(z=s.parameters)==null?void 0:z.docs)==null?void 0:A.source}}};var I,D,_;l.parameters={...l.parameters,docs:{...(I=l.parameters)==null?void 0:I.docs,source:{originalSource:`{
  args: {
    accessory: true,
    button: true,
    children: true,
    detailPanel: true,
    image: true,
    menuButtonChildren: true,
    variant: "compact"
  }
}`,...(_=(D=l.parameters)==null?void 0:D.docs)==null?void 0:_.source}}};var O,F,w;c.parameters={...c.parameters,docs:{...(O=c.parameters)==null?void 0:O.docs,source:{originalSource:`{
  args: {
    accessory: true,
    button: true,
    children: true,
    detailPanel: true,
    image: true,
    isLoading: true,
    menuButtonChildren: true,
    variant: "tile"
  }
}`,...(w=(F=c.parameters)==null?void 0:F.docs)==null?void 0:w.source}}};const ie=["Default","Clickable","Tile","Stack","Compact","Loading"],xe=Object.freeze(Object.defineProperty({__proto__:null,Clickable:a,Compact:l,Default:r,Loading:c,Stack:s,Tile:i,__namedExportsOrder:ie,default:ae},Symbol.toStringTag,{value:"Module"}));export{xe as T};
