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"../../../packages/icons/dist/react/NavigationChevronRight.js";import j from"../../../packages/icons/dist/react/NavigationChevronLeft.js";var C=function(C){var b=C.isNext,g=void 0!==b&&b,S=C.onChangeActiveStep,_=void 0===S?n:S,h=C.activeStepIndex,N=C.stepsCount,k=C.isIconHidden,A=void 0!==k&&k,M=C.buttonProps,P=void 0===M?{}:M,y=C.color,B=void 0===y?"primary":y,D=P.children,E=t(P,["children"]),I=i((function(){return D||(g?m:a)}),[g,D]),O=g?h+1:h-1,R=s((function(o){return _(o,O)}),[O,_]),x=g&&h===N-1||!g&&0===h,H=g?v:j;return r.createElement(u,Object.assign({className:e(p.command,o({},p.backward,!g)),"data-testid":g?c.STEPS_FORWARD_COMMAND:c.STEPS_BACKWARD_COMMAND,kind:"tertiary",onClick:R,disabled:x,color:B},E),I,A?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
