<div class="subtype-select" data-type="<%= account_type %>" style="display: none;">
  <% if subtype_config[:options].present? %>
    <%= label_tag "account_subtypes[#{enable_banking_account.id}]", subtype_config[:label],
                 class: "block text-sm font-medium text-primary mb-2" %>
    <% selected_value = account_type == "Depository" ?
         (enable_banking_account.name.downcase.include?("checking") ? "checking" :
          enable_banking_account.name.downcase.include?("savings") ? "savings" : "") : "" %>
    <%= select_tag "account_subtypes[#{enable_banking_account.id}]",
                  options_for_select([["Select #{account_type == 'Depository' ? 'subtype' : 'type'}", ""]] + subtype_config[:options], selected_value),
                  { class: "appearance-none bg-container border border-primary rounded-md px-3 py-2 text-sm leading-6 text-primary focus:border-primary focus:ring-1 focus:ring-primary focus:outline-none w-full" } %>
  <% else %>
    <p class="text-sm text-secondary"><%= subtype_config[:message] %></p>
  <% end %>
</div>
