"use strict";const A=require("react/jsx-runtime"),e=require("react"),n=require("../tools/tools.cjs"),f=require("./list-group-item.cjs"),l=function(v){const{as:y="ul",className:a,dropOldClass:u,flush:c,horizontal:s,itemAction:G,numbered:p,options:L,style:d,variables:m,variant:o,...b}=v,x=(L??[]).map((t,r)=>({...t,id:t.id??r})),[i]=e.useState(x),g=e.useMemo(()=>{const t=n.classx(!u&&"list-group",c&&"list-group-flush",p&&"list-group-numbered",s&&`list-group-horizontal${typeof s=="boolean"?"":"-"+s}`,o&&`list-group-item-${o}`,a),r=n.stylex((O,q)=>({tKey:n.convertBsKeyToVar(q)}),m,d);return{className:t,style:r}},[a,u,c,s,p,d,m,o]),h=e.useMemo(()=>i.some(t=>t.active),[i]);return A.jsx(y,{...b,...g,children:i.map(t=>e.createElement(f.ListGroupItem,{...t.props,active:t.active,disabled:t.disabled,flexFill:t.flexFill,itemAction:t.itemAction||h||G,key:t.id,variant:t.variant},t.item))})};l.Item=f.ListGroupItem;l.displayName="BRL.ListGroup";exports.ListGroup=l;
//# sourceMappingURL=list-group.cjs.map
