.row
  .three.columns.alpha
    = f.label :name, t('.name')
    %span.required *
  .eight.columns.omega
    = f.text_field :name, { placeholder: t('.name_placeholder') }
- if @groups.present?
  .row
    .three.columns.alpha
      = f.label :group_ids, t('.groups')
      = render partial: 'admin/shared/whats_this_tooltip', locals: {tooltip_text: t('.groups_tip')}
    .eight.columns.omega
      = f.collection_select :group_ids, @groups, :id, :name, {}, data: { controller: "tom-select", "tom-select-options-value": { plugins: ['remove_button'], maxItems: nil } }, class: "full-width", multiple: true, placeholder: t('.groups_placeholder')
.row
  .three.columns.alpha
    %label= t('.primary_producer')
    = render partial: 'admin/shared/whats_this_tooltip', locals: {tooltip_text: t('.primary_producer_tip')}
  .five.columns.omega
    = f.check_box :is_primary_producer, data: { action: "change->primary-details#primaryProducerChanged" }
    = f.label :is_primary_producer, t('.producer')
.row
  .three.columns.alpha
    %label= t('.visible_in_search')
    = render partial: 'admin/shared/whats_this_tooltip', locals: {tooltip_text: t('.visible_in_search_tip')}
  .two.columns
    = f.radio_button :visible, "public", 'ng-model' => 'Enterprise.visible'
    = f.label :visible, t('.visible'), value: 'public'
  .two.columns
    = f.radio_button :visible, "only_through_links", 'ng-model' => 'Enterprise.visible'
    = f.label :visible, t('.not_visible'), value: 'only_through_links'
  .four.columns.omega
    = f.radio_button :visible, "hidden", 'ng-model' => 'Enterprise.visible'
    = f.label :visible, t('.hidden'), value: 'hidden'

= render partial: 'admin/enterprises/form/permalink'

- if spree_current_user.admin?
  .row
    %fieldset.alpha.no-border-bottom
      %legend= t('.admin_only_legend')
    .row
      .three.columns.alpha
        = f.label :sells, t('.sells')
        = render partial: 'admin/shared/whats_this_tooltip', locals: {tooltip_text: t('.sells_tip')}
      .two.columns
        = f.radio_button :sells, "none", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
        = f.label :sells, t('.none'), value: "none"
      .two.columns
        = f.radio_button :sells, "own", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
        = f.label :sells, t('.own'), value: "own"
      .four.columns.omega
        = f.radio_button :sells, "any", 'ng-model' => 'Enterprise.sells', data: {action: "change->primary-details#enterpriseSellsChanged"}
        = f.label :sells, t('.any'), value: "any"
        %span{ style: "width: 30px; height: 30px;", class: "hidden", data: { "primary-details-target": "spinner" } }
          = render partial: "components/admin_spinner"
    .row
      .three.columns.alpha
        = f.label :external_billing_id, t('.external_billing_id')
        = render partial: 'admin/shared/whats_this_tooltip', locals: {tooltip_text: t('.external_billing_id_tip')}
      .four.columns
        = f.text_field :external_billing_id, { placeholder: t('.external_billing_id_placeholder') }
