{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}
<div ...attributes {{did-update this.updateSuggestions @mountPath}}>
  {{#if @label}}
    <FormFieldLabel for={{this.inputId}} @label={{@label}} @subText={{@subText}} />
  {{/if}}
  <FilterInput
    @id={{this.inputId}}
    placeholder="Path to secret"
    @value={{@value}}
    disabled={{not @mountPath}}
    @onInput={{this.onInput}}
    {{! used to trigger dropdown to open }}
    {{on "click" this.onInputClick}}
    data-test-kv-suggestion-input
  />
  <PowerSelect
    @eventType="click"
    @options={{this.secrets}}
    @onChange={{this.onSuggestionSelect}}
    @renderInPlace={{true}}
    @disabled={{not @mountPath}}
    @registerAPI={{fn (mut this.powerSelectAPI)}}
    {{! hide trigger component and use API to toggle dropdown }}
    @triggerClass="is-hidden"
    @noMatchesMessage="No suggestions for this path"
    data-test-kv-suggestion-select
    as |secret|
  >
    {{secret}}
  </PowerSelect>
</div>