<%= simple_form_for([:settings,@settings_order_queue_station]) do |f| %>
  <%= f.error_notification %>
  <%= f.input :processing_items, as: :hidden %>
  <strong>Select Menu Items</strong><br/><br/>
  <div class="row">
    <% @menu_categories.each do |category|%>

      <div class="col-lg-3 col-md-3 col-sm-6">
        <div class="card" style="padding-left:5px">
          <div class="card-title">
              <h4><%= category.name %>
              <br/><br/>

              <button type="button" data-id="menu_items_category_<%= category.id %>" class="btn btn-default processingitems_all" aria-label="Left Align">
                <i class="fa fa-list" aria-hidden="true"></i>
              </button>
              <button type="button" data-id="menu_items_category_<%= category.id %>" class="processingitems_clr btn btn-default" aria-label="Left Align">
                <i class="fa fa-minus-circle" aria-hidden="true"></i>
              </button>
          </div>
        <ul class="opi_ul" id="menu_items_category_<%= category.id %>">
          <% category.menu_items.each do |item| %>
            <% flag =  false %>
            <% itemsary = JSON.parse(@settings_order_queue_station.processing_items) %>
            <% itemsary.each do |item_code| %>
              <% if item_code ==  item.item_code %>
                <% flag = true %>
              <% end %>
            <% end %>
            <% if flag == true %>
              <li><div class="processitems opi_default opi_selected" data-id="<%= item.item_code %>"><%= item.name %></div></li>
            <% else %>
              <li><div class="processitems opi_default" data-id="<%= item.item_code %>"><%= item.name %></div></li>
            <% end %>
          <% end %>
        </ul>
        </div>
      </div>
    <% end %>
  </div>
  <br>
  <div class="form-actions">
    <%= f.button :submit,  label: "Add Menu Items to Queue Station" %>
  </div>
  <br>
<% end %>
