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

<form class="hstack mb-2" data-swift-rename-favorite-list
    hx-post
    hx-trigger="blur from:input[name='name'], submit"
    hx-target="[data-swift-rename-favorite-list]"
    hx-select="[data-swift-rename-favorite-list]"
    hx-swap="outerHTML">
    <input type="hidden" name="favoriteListId" id="favoriteListId" value='@(Model?.Id)' />
    <input type="hidden" name="userId" id="userId" value='@(Model?.UserId)' />
    <input type="hidden" name="favoritecmd" value="favoritelistrename" />
    <input type="text" autofocus class="form-control" name="name" id="name" placeholder="@Translate("List name")" value="@(Model?.Name)"/>
</form>