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