import{__assign as e}from"tslib";import{jsxs as o,jsx as l}from"react/jsx-runtime";import{useState as n}from"react";import i from"./RuleAccordionHeader.js";import r from"../styles/RuleAccordion.module.css.js";var t=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return e.filter(Boolean).join(" ")},a=function(a){var d=a.rule,s=a.idx,c=a.ruleSetId,u=a.onRemove,b=a.onEdit,m=a.isGlobalScope,v=void 0!==m&&m,g=a.deleteButtonLabel,f=void 0===g?"Delete":g,p=a.editButtonLabel,L=void 0===p?"Add Variant":p,R=a.defaultOpen,B=void 0!==R&&R,S=a.isOpen,h=a.onToggle,j=a.showDeleteButton,x=void 0===j||j,D=a.className,O=a.children,T=a.enableLearningRuleLabel,A=void 0===T?"Enable":T,C=a.disableLearningRuleLabel,E=void 0===C?"Disable":C,N=a.onToggleSuccess,G=a.dragControls,I=n(B),w=I[0],y=I[1],H=void 0!==S,V=H?S:w;return o("div",e({className:t(r.accordion,V&&r.accordionOpen,D)},{children:[l(i,{rule:d,idx:s,ruleSetId:c,isOpen:V,onToggle:function(){var e=!V;H||y(e),null==h||h(e)},onDelete:x?u:void 0,onEdit:b,isGlobalScope:v,deleteButtonLabel:f,editButtonLabel:L,enableLearningRuleLabel:A,disableLearningRuleLabel:E,onToggleSuccess:N,dragControls:G}),V&&l("div",e({className:r.accordionContent},{children:O}))]}))};export{a as default};
//# sourceMappingURL=RuleAccordionShell.js.map
