@inherits ViewModelTemplate<OrderViewModel>
@using Dynamicweb.Frontend
@using Dynamicweb.Rendering
@using Dynamicweb.Ecommerce.Frontend
@using Dynamicweb.Ecommerce.Orders
@using Dynamicweb.Ecommerce.ProductCatalog

<div class="modal fade" id="acceptQuoteModal" tabindex="-1" aria-labelledby="AcceptQuote" aria-hidden="true" 
  hx-on::load="bootstrap.Modal.getOrCreateInstance(this).show();"
  x-on:hide-bs-modal.dot="
    const el = document.activeElement;
    if (el && $el.contains(el)) el.blur();
  "
  x-on:hidden-bs-modal.dot="
    bootstrap.Modal.getOrCreateInstance($el).dispose();
    $el.remove();
  "
  >
  <div class="modal-dialog pt-8">
    <div class="modal-content">
      <form method="post">
        <div class="modal-header">
          <h5 class="modal-title">@Translate("Accept quote")</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="@Translate("Cancel")"></button>
        </div>
        <div class="modal-body">
          <p class="mb-0 text-muted lh-sm fs-7">@Translate("Are you sure you want to accept quote") <span class="fw-bold text-body">@Model.DisplayName @Model.Id</span> ?</p>
          <input type="hidden" name="QuoteID" id="QuoteID" value='@Model.Id' />
          <input type="hidden" name="CustomerCenterCmd" value="QuoteAccept" />
        </div>
        <div class="modal-footer border-0">
          <button type="button" class="btn btn-outline-secondary btn-sm" data-bs-dismiss="modal" data-dw-button>@Translate("Cancel")</button>
          <button type="submit" class="btn btn-primary btn-sm" data-dw-button>@Translate("Accept quote")</button>
        </div>
      </form>
    </div>
  </div>
</div>