import{j as t}from"./iframe-B8FSoBNY.js";import{c as h}from"./compiler-runtime-BXE7OOXE.js";import{T as g}from"./index-cFwdnc0b.js";import{C as b}from"./chevron-right-owK1wZnx.js";import{B as j}from"./index-B0y2_lLF.js";import{F as y}from"./flex-DAJL4AFZ.js";import{S as C}from"./stack-CN4X31TA.js";import{C as _,a as R,b as S,c as I}from"./collapsible-DBDG7h1r.js";import{a as T}from"./menu-item-CrqDaj9K.js";const q=d=>{const e=h.c(17),{children:f,title:n,defaultOpen:x,action:a}=d,u=x===void 0?!0:x;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={background:"bg.muted"},e[0]=m):m=e[0];let i;e[1]!==n?(i=n&&t.jsx(g,{fontWeight:"600",textStyle:"label/S/medium",children:n}),e[1]=n,e[2]=i):i=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(_,{transition:"transform 0.2s",_open:{transform:"rotate(90deg)"},children:t.jsx(b,{size:16})}),e[3]=c):c=e[3];let o;e[4]!==i?(o=t.jsxs(R,{_hover:m,borderRadius:"xs",padding:"sm",height:"2rem",display:"flex",gap:"2",alignItems:"center",cursor:"pointer",children:[i,c]}),e[4]=i,e[5]=o):o=e[5];let s;e[6]!==a?(s=a&&t.jsx(j,{marginLeft:"auto",onClick:k,children:a}),e[6]=a,e[7]=s):s=e[7];let r;e[8]!==o||e[9]!==s?(r=t.jsxs(y,{children:[o,s]}),e[8]=o,e[9]=s,e[10]=r):r=e[10];let l;e[11]!==f?(l=t.jsx(S,{children:t.jsx(T,{children:t.jsx(C,{gap:"0",paddingLeft:"xs",paddingY:"xs",children:f})})}),e[11]=f,e[12]=l):l=e[12];let p;return e[13]!==u||e[14]!==r||e[15]!==l?(p=t.jsxs(I,{defaultOpen:u,width:"full",children:[r,l]}),e[13]=u,e[14]=r,e[15]=l,e[16]=p):p=e[16],p};q.__docgenInfo={description:"A collapsible component that displays a section of items (typically MenuItems).",methods:[],displayName:"ItemSection",props:{children:{required:!0,tsType:{name:"ReactNode"},description:""},title:{required:!1,tsType:{name:"string"},description:""},defaultOpen:{required:!1,tsType:{name:"boolean"},description:""},action:{required:!1,tsType:{name:"ReactNode"},description:""}}};function k(d){return d.stopPropagation()}export{q as I};
