import { jsx as _jsx } from "react/jsx-runtime";
import { useCallback } from 'react';
import { stepperClassnames } from '../constants';
import { StepIcon } from '../StepIcon';
import { Button, StyledStepLabel } from './styles';
export const StepButton = (props) => {
    const { isSelected, onClick, icon: Icon, ...restProps } = props;
    const stepIconRender = useCallback(({ active, completed, error }) => {
        return (_jsx(StepIcon, { icon: Icon, isSelected: isSelected, active: active, completed: completed, error: error }));
    }, [isSelected, Icon]);
    return (_jsx(Button, { onClick: onClick, tabIndex: 1, className: stepperClassnames.stepButton, children: _jsx(StyledStepLabel, { StepIconComponent: stepIconRender, ...restProps }) }));
};
