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

<Hds::Modal @onClose={{@onClose}} data-test-secrets-sync-opt-in-modal as |M|>
  <M.Header @icon="alert-triangle">
    Enable Secrets Sync feature
  </M.Header>
  <M.Body>
    <p class="has-bottom-margin-m">
      By enabling the Secrets Sync feature you may incur additional costs. Please review our
      <Hds::Link::Inline
        @isHrefExternal={{true}}
        @href={{doc-link "/hcp/docs/vault/what-is-hcp-vault/client#secrets-sync"}}
      >documentation</Hds::Link::Inline>
      to learn more.
    </p>
    <Hds::Form::Checkbox::Field
      {{on "change" (fn (mut this.hasConfirmedDocs) (not this.hasConfirmedDocs))}}
      data-test-opt-in-check
      as |F|
    >
      <F.Label>I've read the above linked document</F.Label>
    </Hds::Form::Checkbox::Field>
  </M.Body>
  <M.Footer>
    <Hds::ButtonSet>
      <Hds::Button
        data-test-opt-in-confirm
        @text="Confirm"
        disabled={{not this.hasConfirmedDocs}}
        {{on "click" (perform this.onFeatureConfirm)}}
      />
      <Hds::Button data-test-opt-in-cancel @text="Cancel" @color="secondary" {{on "click" @onClose}} />
    </Hds::ButtonSet>
  </M.Footer>
</Hds::Modal>