{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}

{{#if (and (has-block "intro") this.isIntroVisible)}}
  {{! pass @onDismiss on for modal closure via clicking outside modal @onClose}}
  <Wizard::Intro @isModal={{@isModal}} @title={{@title}} @onDismiss={{@onDismiss}} class="wizard intro" data-test-intro>
    <:body>
      {{yield to="intro"}}
    </:body>
    <:actions>
      {{yield to="introActions"}}
    </:actions>
  </Wizard::Intro>
{{else}}
  <Wizard::GuidedStart
    @canProceed={{@canProceed}}
    @currentStep={{@currentStep}}
    @steps={{@steps}}
    @title={{@title}}
    @wizardState={{@wizardState}}
    @updateWizardState={{@updateWizardState}}
    @onStepChange={{@onStepChange}}
    @onDismiss={{@onDismiss}}
    class="wizard"
    data-test-guided-start
  >
    <:exit>
      {{#if (has-block "exit")}}
        {{yield to="exit"}}
      {{else}}
        <Hds::Button @text="Exit" {{on "click" @onDismiss}} data-test-cancel />
      {{/if}}
    </:exit>
    <:submit>
      {{#if (has-block "submit")}}
        {{yield to="submit"}}
      {{else}}
        <Hds::Button @text="Mark as complete" {{on "click" @onDismiss}} data-test-submit />
      {{/if}}
    </:submit>
  </Wizard::GuidedStart>
{{/if}}