ActiveAdmin.register JamRuby::AppFeature, as: 'App Features' do
  
  menu parent: 'Misc', label: 'App Features'

  config.sort_order = 'created_at ASC'
  config.batch_actions = false
  config.filters = false
  config.per_page = 50
  config.paginate = true

  form do |f|
    f.inputs 'Fields' do
      f.input(:feature_type, as: :select, collection: JamRuby::AppFeature::FEATURE_TYPES)
      f.input(:handle, :input_html => { :maxlength => 1025 })
      f.input(:is_enabled, as: :boolean)
      f.input(:env, as: :select, collection: %w(production staging development))
    end
    f.actions
  end

end