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