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

{{page-title "Edit Variable"}}

<h1 class="title variable-title">
  <LinkTo class="back-link" @route="variables.variable.index">
    <FlightIcon
      @name="chevron-left"
      @title="Back to {{this.model.path}}"
      @size="24"
      />
  </LinkTo>
  Edit
  {{this.model.path}}
  <Toggle
    data-test-json-toggle
    @isActive={{eq this.view "json"}}
    @onToggle={{action this.toggleView}}
    title="JSON"
  >JSON</Toggle>

</h1>

<VariableForm
  @model={{this.model}}
  @existingVariables={{this.existingVariables}}
  @view={{this.view}}
/>
