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