<div class="mg-b-2" data-test-selector="ext-installed">
  <div class="brick brick--theme-white flex flex--nowrap flex--verticalCenter">
    <img src="{{extension.iconUrl}}" class="square-5 mg-r-1 flex__item flex__item--noShrink" data-test-selector="ext-installed-icon">
    <div class="flex_item flex__item--grow">
      {{#link-to 'settings.extensions.details' extension.id}}
        <h5 data-test-selector="ext-installed-name" class="mg-b-0">{{extension.name}}</h5>
        <span class="pill upcase">{{extension.anchorLabel}}</span>
      {{/link-to}}
    </div>
    {{#if installedExtension.active}}
      <div class="flex_item">
        {{#common/button-element testSelector='ext-installed-deactivate' isHollow=true onClick=(action 'onDeactivateClicked')}}
          {{i18n 'Deactivate'}}
        {{/common/button-element}}
      </div>
    {{/if}}
  </div>
  <div class="ext-active-indicator brick {{if installedExtension.active 'brick--theme-purple theme--dark' ''}} mg-b-1 flex flex--nowrap flex--verticalCenter">
    {{#if installedExtension.active}}
      <div class="flex__item flex__item--grow">
        <span class="ext-active-indicator__icon"></span>
        <span class="ext-active-indicator__text upcase small mg-0">{{activeLabel}}</span>
      </div>
    {{else}}
      {{#if extension.needsConfig}}
        <div class="flex__item flex__item--grow">
          <span class="hint">{{i18n 'Needs Configuration'}}</span>
        </div>
      {{else}}
        <div class="flex__item flex__item--grow">
          {{#common/balloon-menu testSelector='ext-installed-activate' isDropMenu=true as |menu|}}
            {{#menu.button size='small'}}
              {{i18n 'Activate'}}
            {{/menu.button}}

            {{#menu.balloon direction='down'}}
              {{#each availableSlots as |slot|}}
                {{#menu.balloonItem onClick=(action 'onActivateClicked' slot) testSelector='ext-activate-existing'}}
                  {{slot.label}}
                {{/menu.balloonItem}}
              {{/each}}
              {{#if availableSlots}}
                {{menu.balloonItem isSeparator=true}}
              {{/if}}
              {{#menu.balloonItem onClick=(action 'onActivateNewClicked' slot) testSelector='ext-activate-new'}}
                {{i18n 'Add as a new panel'}}
              {{/menu.balloonItem}}
            {{/menu.balloon}}
          {{/common/balloon-menu}}
        </div>
      {{/if}}
    {{/if}}
    <div class="flex__item">
      {{#common/button-element testSelector='ext-installed-config' size='small' iconOnly=true onClick=(action 'onConfigClicked')}}
        {{svg-icon path='svg/gear'}}
      {{/common/button-element}}
      {{#common/button-element testSelector='ext-installed-uninstall' size='small' iconOnly=true onClick=(action 'onUninstallClicked')}}
        {{svg-icon path='svg/trash'}}
      {{/common/button-element}}
    </div>
  </div>
</div>