import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"classnames";import i,{forwardRef as s,useCallback as o,useMemo as l}from"react";import{Check as r}from"@vibe/icons";import a from"../Divider/Divider.js";import{NOOP as n}from"../../utils/function-utils.js";import p from"./components/StepIndicator/StepIndicator.js";import{MultiStepType as m,StepStatus as c,TextPlacement as d,Size as f}from"./MultiStepConstants.js";import{getTestId as u}from"../../tests/testIds.js";import{ComponentDefaultTestId as v}from"../../tests/constants.js";import{withStaticProps as y}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import S from"./MultiStepIndicator.module.scss.js";var C=y(s((function(s,m){var c=s.className,d=s.steps,f=void 0===d?[]:d,y=s.type,C=void 0===y?"primary":y,N=s.stepComponentClassName,I=s.dividerComponentClassName,j=s.fulfilledStepIcon,g=void 0===j?r:j,b=s.fulfilledStepIconType,D=void 0===b?"svg":b,T=s.isFulfilledStepDisplayNumber,h=void 0!==T&&T,E=s.onClick,P=void 0===E?n:E,_=s.textPlacement,k=void 0===_?"horizontal":_,x=s.id,F=s["data-testid"],z="vertical"===k?"regular":s.size,w=o((function(s,o){return i.createElement(i.Fragment,{key:"".concat(s.titleText,"_").concat(o)},i.createElement(p,Object.assign({},s,{stepNumber:o+1,type:C,stepComponentClassName:N,fulfilledStepIcon:g,fulfilledStepIconType:D,onClick:P,isFulfilledStepDisplayNumber:h,size:z})),o!==f.length-1&&i.createElement(a,{className:t(S.divider,I,e({},S.compact,"compact"===z))}))}),[P,h,C,N,g,D,I,f.length,z]),M=o((function(e,s){return i.createElement(p,Object.assign({},e,{key:"".concat(e.titleText,"_").concat(s),stepNumber:s+1,type:C,stepComponentClassName:N,fulfilledStepIcon:g,fulfilledStepIconType:D,onClick:P,isFollowedByDivider:s!==f.length-1,stepDividerClassName:t(S.divider,I),isVertical:!0,isFulfilledStepDisplayNumber:h}))}),[P,h,C,N,g,D,I,f.length]),O=l((function(){return"vertical"===k?M:w}),[k,M,w]);return i.createElement("ol",{ref:m,id:x,"data-testid":F||u(v.MULTI_STEP_INDICATOR,x),className:t(S.wrapper,c)},f.map(O))})),{types:m,stepStatuses:c,textPlacements:d,sizes:f});export{C as default};
//# sourceMappingURL=MultiStepIndicator.js.map
