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