import ciIcon from '../../vue_shared/components/ci_icon.vue';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';

export default {
  props: {
    status: { type: String, required: true },
    showDisabledButton: { type: Boolean, required: false },
  },
  components: {
    ciIcon,
    loadingIcon,
  },
  computed: {
    statusObj() {
      return {
        group: this.status,
        icon: `icon_status_${this.status}`,
      };
    },
  },
  template: `
    <div class="space-children flex-container-block append-right-10">
      <div v-if="status === 'loading'" class="mr-widget-icon">
        <loading-icon />
      </div>
      <ci-icon v-else :status="statusObj" />
      <button
        v-if="showDisabledButton"
        type="button"
        class="js-disabled-merge-button btn btn-success btn-sm"
        disabled="true">
        Merge
      </button>
    </div>
  `,
};

import ciIcon from '../../vue_shared/components/ci_icon.vue';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';

export default {
  props: {
    status: { type: String, required: true },
    showDisabledButton: { type: Boolean, required: false },
  },
  components: {
    ciIcon,
    loadingIcon,
  },
  computed: {
    statusObj() {
      return {
        group: this.status,
        icon: `status_${this.status}`,
      };
    },
  },
  template: `
    <div class="space-children flex-container-block append-right-10">
      <div v-if="status === 'loading'" class="mr-widget-icon">
        <loading-icon />
      </div>
      <ci-icon v-else :status="statusObj" />
      <button
        v-if="showDisabledButton"
        type="button"
        class="js-disabled-merge-button btn btn-success btn-sm"
        disabled="true">
        Merge
      </button>
    </div>
  `,
};

Fix missing MR widget status icons
Fix missing MR widget status icons

Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/40283

Regressed in
https://gitlab.com/gitlab-org/gitlab-ce/commit/d01d509bd8612f9879fa762de8ea3763bcff81cf
