import{defineProperty as o}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../../_virtual/_tslib.js";import r,{useMemo as e,useCallback as i}from"react";import s from"classnames";import{NavigationChevronRight as m,NavigationChevronLeft as n}from"@vibe/icons";import{Icon as a}from"@vibe/icon/mockedClassNames";import{Button as l}from"@vibe/button/mockedClassNames";import{NOOP as c}from"../../utils/function-utils.js";import{NEXT_TEXT as p,BACK_TEXT as d}from"./StepsConstants.js";import{ComponentDefaultTestId as u}from"../../tests/constants.js";import f from"./StepsCommand.module.scss.js";import{camelCase as v}from"es-toolkit";import{getStyle as b}from"../../helpers/typesciptCssModulesHelper.js";var C=function(C){var j=C.isNext,S=void 0!==j&&j,_=C.onChangeActiveStep,N=void 0===_?c:_,k=C.activeStepIndex,A=C.stepsCount,M=C.isIconHidden,P=void 0!==M&&M,h=C.buttonProps,y=void 0===h?{}:h,D=C.color,E=void 0===D?"primary":D,O=y.children,g=t(y,["children"]),x=e((function(){return O||(S?p:d)}),[S,O]),H=S?k+1:k-1,R=i((function(o){return N(o,H)}),[H,N]),B=S&&k===A-1||!S&&0===k,I=S?m:n;return r.createElement(l,Object.assign({className:s(f.command,o({},f.backward,!S)),"data-testid":S?u.STEPS_FORWARD_COMMAND:u.STEPS_BACKWARD_COMMAND,kind:"tertiary",onClick:R,disabled:B,color:E},g),x,P?null:r.createElement(a,{icon:I,className:s(f.icon,b(f,v("color-"+E)),o({},f.disabled,B))}))};export{C as StepsCommand};
//# sourceMappingURL=StepsCommand.js.map
