if threshold
  .ui.left.labeled.input
    .ui.label Max
    = number-input numericValue=value step=1
else
  .ui.input= number-input numericValue=value step=1
= ui-dropdown class='selection' selected=unit onChange=(action (mut unit))
  /.default.text= t model.batch_element_threshold_unit scope='date.unit.plural' bare=true
  .text
  i.dropdown.icon
  .menu
    each globals.workflow_group.batch_element_threshold_unit_options as |batch_element_threshold_unit|
      .item data-value=batch_element_threshold_unit
        if threshold
          span per 
          = t batch_element_threshold_unit scope='date.unit'
        else
          = t batch_element_threshold_unit scope=value_date_scope
if unit_businessday
  span class=has_default_business_days:default-business-days:non-default-business-days
    = ui-dropdown class='right basic labeled icon select-businessdays-in-week' action='nothing'
      i.dropdown.icon
      span.ui.tiny.header= t 'date.unit.plural.day'
      .menu
        .scrolling.menu
          each globals.week_days as |week_day|
            ui-checkbox class='item' label=(t week_day.name scope='date.week_day') checked=(contains week_day.index week_days) onChange=(action 'toggle_week_day_presence' week_days week_day)
