class ApplicationHelper::Toolbar::AutomationManagerProviderCenter < ApplicationHelper::Toolbar::Basic
  button_group('provider_vmdb', [
    select(
      :provider_vmdb_choice,
      nil,
      t = N_('Configuration'),
      t,
      :enabled => true,
      :items   => [
        button(
          :automation_manager_refresh_provider,
          'fa fa-refresh fa-lg',
          N_('Refresh relationships for all items related to this Provider'),
          N_('Refresh Relationships and Power states'),
          :url     => "refresh",
          :confirm => N_("Refresh relationships for all items related to this Provider?"),
          :klass   => ApplicationHelper::Button::EmsRefresh
        ),
        separator,
        button(
          :automation_manager_edit_provider,
          'pficon pficon-edit fa-lg',
          t = N_('Edit this Provider'),
          t,
          :url => "edit"
        ),
        button(
          :automation_manager_delete_provider,
          'pficon pficon-delete fa-lg',
          t = N_('Remove this Provider from Inventory'),
          t,
          :data  => {'function'      => 'sendDataWithRx',
                     'function-data' => {:controller     => 'provider_dialogs',
                                         :modal_title    => N_('Delete Ansible Tower Provider'),
                                         :modal_text     => N_('Are you sure you want to delete the following Ansible Tower Provider?'),
                                         :api_url        => 'providers',
                                         :async_delete   => true,
                                         :tree_select    => 'root',
                                         :component_name => 'RemoveGenericItemModal'}}
        )
      ]
    ),
  ])
end
