{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
~}}

<div class="console-ui-input" data-test-component="console/command-input">
  {{#if this.isRunning}}
    <div class="control console-spinner is-loading"></div>
  {{else}}
    <Chevron />
  {{/if}}
  <input onkeyup={{action "handleKeyUp"}} value={{this.value}} autocomplete="off" spellcheck="false" />
  <ToolTip @horizontalPosition="auto-right" @verticalPosition="above" as |d|>
    <d.Trigger>
      <button
        type="button"
        class={{concat "button is-compact" (if this.isFullscreen " active")}}
        {{on "click" (action "fullscreen")}}
        data-test-tool-tip-trigger
      >
        <Icon
          @name={{if this.isFullscreen "minimize" "maximize"}}
          aria-label={{if this.isFullscreen "Minimize" "Maximize"}}
        />
      </button>
    </d.Trigger>
    <d.Content @defaultClass="tool-tip">
      <div class="box">
        {{#if this.isFullscreen}}
          Minimize
        {{else}}
          Maximize
        {{/if}}
      </div>
    </d.Content>
  </ToolTip>
</div>
<NamespaceReminder @class="console-reminder" @mode="execute" @noun="command" />