Conditional steps on wizard

Hi guys, is it possible to make conditional steps on wizard?
Right now I have this wizard on my CreateClient component:
    protected function getSteps(): array
    {
        return [
            Forms\Components\Wizard\Step::make(__('General'))
                ->schema([
                    Forms\Components\ToggleButtons::make('type')
                        ->label(__('Type'))
                        ->options(ClientType::class)
                        ->required()
                        ->inline()
                        ->columnSpan(4),
                ]),

            Forms\Components\Wizard\Step::make(__('Individual'))
                ->schema([])
                ->visible(fn (Forms\Get $get) => $get('type') === 'individual'),

            Forms\Components\Wizard\Step::make(__('Self-employed'))
                ->schema([])
                ->visible(fn (Forms\Get $get) => $get('type') === 'self-employed'),

            Forms\Components\Wizard\Step::make(__('Company'))
                ->schema([])
                ->visible(fn (Forms\Get $get) => $get('type') === 'company'),

            Forms\Components\Wizard\Step::make(__('Representative'))
                ->schema([])
                ->visible(fn (Forms\Get $get) => $get('type') === 'company'),

            Forms\Components\Wizard\Step::make(__('Attachments'))
                ->schema([]),

            Forms\Components\Wizard\Step::make(__('Address'))
                ->schema(Address::make()),
        ];
    }

Problem is, when I select company as a type in general step, after clicking next button it will jump to Attachments step and skips steps Company and Representative.
Was this page helpful?