"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("./RuleAccordionShell.js"),t=require("./VariantList.js");exports.RuleAccordionShell=r.default,exports.VariantList=t.default,exports.default=function(o){var n=o.rule,a=o.ruleSetId,l=o.idx,s=o.allTiers,d=o.currentTierId,u=o.onRemove,v=o.isGlobalScope,h=void 0!==v&&v,c=o.onFetchOverrideHistory,b=o.deleteButtonLabel,L=void 0===b?"Delete":b;o.inheritedOverrideLabel,o.defaultVariantLabel;var g=o.viewOverrideLabel,p=void 0===g?"View Override History":g,f=o.hideOverrideLabel,T=void 0===f?"Hide Override History":f,w=o.enableLearningVariantLabel,y=void 0===w?"Enable":w,m=o.disableLearningVariantLabel,D=void 0===m?"Disable":m,V=o.enableLearningRuleLabel,x=void 0===V?"Enable":V,C=o.disableLearningRuleLabel,I=void 0===C?"Disable":C,O=o.editButtonLabel,B=void 0===O?"Edit":O,A=o.whenToApplyLabel,N=void 0===A?"When to Apply":A,S=o.whenNotToApplyLabel,E=void 0===S?"When Not to Apply":S,R=o.noConditionsText,_=void 0===R?"No conditions":R,j=o.historyErrorMessage,F=void 0===j?"Failed to load override history.":j;o.missingRuleIdMessage;var H=o.onEditVariant,q=o.onDeleteVariant,M=o.onEdit,G=o.tierName,U=o.defaultOpen,W=void 0!==U&&U,z=o.showDeleteButton,P=void 0===z||z,k=o.showActionsBar,J=void 0===k||k;o.tierChip,o.customVariantChip;var K=o.showDescriptionBox,Q=void 0===K||K;o.customDescription;var X=o.showConditions,Y=void 0===X||X,Z=o.showInheritance,$=void 0===Z||Z,ee=o.showConnectors,ie=void 0===ee||ee,re=o.className,te=o.highlightedVariants,oe=o.highlightedTierNames,ne=o.onToggleSuccess,ae=o.dragControls,le=o.setDeleteConfirmationUsedFor,se=o.onCopyToTier,de=n.variants&&n.variants.length>0,ue=!(!te||0===te.size||!de)&&n.variants.some(function(e){return te.has(e.variantId)}),ve={rule:n,idx:l,ruleSetId:a,onRemove:function(){if(null==le||le("ruleDeletion"),de&&q){var e=(n.variants.find(function(e){return"Default"===e.variantType})||n.variants[0]).variantId;q(e,n.ruleId)}else u&&u()},onEdit:M?function(){return M(n,G)}:void 0,isGlobalScope:h,deleteButtonLabel:L,defaultOpen:W||ue,showDeleteButton:P,className:re,enableLearningRuleLabel:x,disableLearningRuleLabel:I,onToggleSuccess:ne,dragControls:ae};if(de){var he={variants:n.variants,ruleId:n.ruleId,ruleSetId:a,ruleTitle:n.ruleTitle,tierName:G,allTiers:s,currentTierId:d,onEditVariant:H,onDeleteVariant:q,onFetchOverrideHistory:c?function(e,i){return c(e,i)}:void 0,editButtonLabel:B,deleteButtonLabel:"Delete",whenToApplyLabel:N,whenNotToApplyLabel:E,noConditionsText:_,viewOverrideLabel:p,hideOverrideLabel:T,enableLearningVariantLabel:y,disableLearningVariantLabel:D,historyErrorMessage:F,showActionsBar:J,showDescriptionBox:Q,showConditions:Y,showInheritance:$,showConnectors:ie,highlightedVariants:te,highlightedTierNames:oe,onToggleSuccess:ne,setDeleteConfirmationUsedFor:le,onCopyToTier:se};return i.jsx(r.default,e.__assign({},ve,{children:i.jsx(t.default,e.__assign({},he))}))}return i.jsx(r.default,e.__assign({},ve))};
//# sourceMappingURL=RuleAccordion.js.map
