<% 
let options = [];

const profile = Array.isArray(tunerProfiles)
    ? tunerProfiles.find((item) => item.id === device)
    : null;

if (Array.isArray(profile?.fmBandwidths)) {
    options = profile.fmBandwidths;
}
%>

<div class="no-bg dropdown data-bw <%= cssClass %>" id="<%= id %>">
  <input type="text" placeholder="Auto" readonly tabindex="0">
  <ul class="options <%= cssClassOptions %>" tabindex="-1">
    <% options.forEach(function(opt) { %>
      <li class="option" tabindex="0" data-value="<%= opt.value %>" <%= opt.value2 !== undefined ? 'data-value2="' + opt.value2 + '"' : '' %>><%= opt.label %></li>
    <% }); %>
  </ul>
</div>
