<div class="row py-5">
  <div class="col-12 col-lg-10 col-xl-8 mx-auto form-container">
    <div class="card">
      <div class="card-body">
        <h5 class="card-title"><i class="fas fa-edit"></i> Edit Investment</h5>
        <hr>

        <form class="row g-3" action="/investments/{{ investment.id }}?_method=PUT" method="POST">
          {{!-- Name --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="name" class="col-md-4 col-form-label">Name<span class="field-required">*</span></label>
            <input type="text" name="name" class="form-control col-md-8" id="name" value="{{ investment.name }}" required maxlength="25">
          </div>
          {{!-- Cost --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="cost" class="col-md-4 col-form-label">Cost<span class="field-required">*</span></label>
            <input type="number" name="cost" class="form-control col-md-8" id="cost" value="{{ investment.cost }}" required min="1">
          </div>
          {{!-- Date Acquired --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="dateAcquired" class="col-md-4 col-form-label">Date Acquired<span class="field-required">*</span></label>
            <input type="date" name="dateAcquired" class="form-control col-md-8" id="dateAcquired" value="{{ investment.date_acquired }}" required>
          </div>
          {{!-- Expected Return Type --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="expectedReturnType" class="col-md-4 col-form-label">Return Type<span class="field-required">*</span></label>
            <select class="custom-select col-md-8" name="expectedReturnType" id="expectedReturnType">
              <option value="Revenue" {{#if (eq investment.expected_return_type 'Revenue')}}selected{{/if}}>Revenue</option>
              <option value="CostSavings" {{#if (eq investment.expected_return_type 'CostSavings')}}selected{{/if}}>Cost Savings</option>
              <option value="Both" {{#if (eq investment.expected_return_type 'Both')}}selected{{/if}}>Both</option>
            </select>
          </div>
          {{!-- Return to Date --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="returnToDate" class="col-md-4 col-form-label">Return to Date</label>
            <input type="number" name="returnToDate" class="form-control col-md-8" id="returnToDate" value="{{ investment.return_to_date }}" min="0">
          </div>
          {{!-- Status --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="status" class="col-md-4 col-form-label">Status</label>
            <select class="custom-select col-md-8" name="status" id="status">
              <option value="Recouping" {{#if (eq investment.status 'Recouping')}}selected{{/if}}>Recouping</option>
              <option value="BreakEven" {{#if (eq investment.status 'BreakEven')}}selected{{/if}}>Break Even</option>
              <option value="Profitable" {{#if (eq investment.status 'Profitable')}}selected{{/if}}>Profitable</option>
            </select>
          </div>
          {{!-- Notes --}}
          <div class="col-md-12 row mb-3 ml-1 mr-4">
            <label for="notes" class="col-md-4 col-form-label">Notes</label>
            <textarea name="notes" class="form-control col-md-8" id="notes" rows="3">{{ investment.notes }}</textarea>
          </div>
          {{!-- Button --}}
          <div class="col-md-12 d-flex justify-content-end mr-4">
            <button class="btn btn-success" type="submit">Save</button>
          </div>
        </form>

      </div>
    </div>
  </div>
</div>
