/**
* External dependencies
*/
import React from 'react';
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
/**
* Internal dependencies
*/
import Icon from '../sui-icon';
import './style.scss';
/**
* StepsBar component.
*
* @since 3.2.0
*
* @param {number} currentStep Current step.
* @return {JSX.Element} Component.
*/
export default function StepsBar( { currentStep } ) {
const steps = [
{ number: 1, title: __( 'Server Type', 'wphb' ) },
{ number: 2, title: __( 'Set Expiry', 'wphb' ) },
{ number: 3, title: __( 'Add Rules', 'wphb' ) },
];
const completeTooltip = __( 'This stage is already completed.', 'wphb' );
const getStepClass = ( step ) => {
if ( step > currentStep ) {
return 'wizard-bar-step';
}
return step === currentStep ? 'wizard-bar-step current' : 'wizard-bar-step sui-tooltip done';
};
const getStepNumber = ( step ) => {
return currentStep > step ?