<ActionCardContainer
  @header="Card Space Setup"
  @isComplete={{@isComplete}}
  data-test-card-space-details-is-complete={{@isComplete}}
>
  <ActionCardContainer::Section @title="Fill out the Card Space details">
  </ActionCardContainer::Section>

  <Boxel::ActionChin
    @state={{if @isComplete "memorialized" "default"}}
    @disabled={{@frozen}}
  >
    <:default as |d|>
      <d.ActionButton
        {{on "click" this.toggleDetailsForm}}
        data-test-card-space-details-start-button
      >
        Get Started
      </d.ActionButton>
    </:default>
    <:memorialized as |m|>
      <m.ActionButton
        data-test-card-space-details-edit-button
        {{on "click" this.toggleDetailsForm}}
      >
        Edit
      </m.ActionButton>
    </:memorialized>
  </Boxel::ActionChin>

  {{#in-element this.detailsModalElement}}
    <Boxel::Modal
      @size="medium"
      @isOpen={{this.detailsModalShown}}
      @onClose={{this.toggleDetailsForm}}
      class='create-space-workflow-details__modal'
    >
      <CardSpace::EditDetails
        @workflowSession={{@workflowSession}}
        @onSave={{this.onSave}}
      />
    </Boxel::Modal>
  {{/in-element}}
</ActionCardContainer>
