| 1 |
<template> |
| 2 |
<div class="wpfnl-mm-setup-wizard-steps"> |
| 3 |
<div |
| 4 |
v-for="(step, index) in steps" |
| 5 |
:key="index" |
| 6 |
class="wpfnl-mm-setup-wizard-step" |
| 7 |
:class="{ |
| 8 |
'active': currentStep === index + 1, |
| 9 |
'completed': currentStep > index + 1 |
| 10 |
}" |
| 11 |
> |
| 12 |
<div class="wpfnl-mm-setup-wizard-step-number"> |
| 13 |
<svg v-if="currentStep > index + 1" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">> |
| 14 |
<circle cx="8" cy="8" r="8" fill="#239654"/> |
| 15 |
<path d="M11.3333 5.33334L6.66667 10L4.66667 8" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
| 16 |
</svg> |
| 17 |
<span v-else>{{ index + 1 }}</span> |
| 18 |
</div> |
| 19 |
<span class="wpfnl-mm-setup-wizard-step-label">{{ step }}</span> |
| 20 |
</div> |
| 21 |
</div> |
| 22 |
</template> |
| 23 |
|
| 24 |
<script> |
| 25 |
export default { |
| 26 |
name: 'Steps', |
| 27 |
props: { |
| 28 |
currentStep: { |
| 29 |
type: Number, |
| 30 |
default: 1 |
| 31 |
}, |
| 32 |
selectedGoal: { |
| 33 |
type: String, |
| 34 |
default: '' |
| 35 |
} |
| 36 |
}, |
| 37 |
computed: { |
| 38 |
steps() { |
| 39 |
// Before goal selection or default view - show 5 generic steps |
| 40 |
if (!this.selectedGoal || this.currentStep <= 3) { |
| 41 |
return [ |
| 42 |
'Welcome', |
| 43 |
'Setup', |
| 44 |
'Choose Goal', |
| 45 |
'Choose Template', |
| 46 |
'Complete' |
| 47 |
]; |
| 48 |
} |
| 49 |
|
| 50 |
// After goal selection - show dynamic steps based on goal |
| 51 |
if (this.selectedGoal === 'order-value') { |
| 52 |
return [ |
| 53 |
'Welcome', |
| 54 |
'Setup', |
| 55 |
'Choose Goal', |
| 56 |
'Choose Template', |
| 57 |
'Build Funnel', |
| 58 |
'Complete' |
| 59 |
]; |
| 60 |
} |
| 61 |
|
| 62 |
if (this.selectedGoal === 'improve-checkout') { |
| 63 |
return [ |
| 64 |
'Welcome', |
| 65 |
'Setup', |
| 66 |
'Choose Goal', |
| 67 |
'Choose Template', |
| 68 |
'Generate Funnel', |
| 69 |
'Complete' |
| 70 |
]; |
| 71 |
} |
| 72 |
|
| 73 |
if (this.selectedGoal === 'sales') { |
| 74 |
return [ |
| 75 |
'Welcome', |
| 76 |
'Setup', |
| 77 |
'Choose Goal', |
| 78 |
'Product Sync', |
| 79 |
'Choose Template', |
| 80 |
'Generate Funnel', |
| 81 |
'Complete' |
| 82 |
]; |
| 83 |
} |
| 84 |
|
| 85 |
// Fallback to default |
| 86 |
return [ |
| 87 |
'Welcome', |
| 88 |
'Setup', |
| 89 |
'Choose Goal', |
| 90 |
'Choose Template', |
| 91 |
'Complete' |
| 92 |
]; |
| 93 |
} |
| 94 |
}, |
| 95 |
} |
| 96 |
</script> |