<script>
 import {
     Badge,
 } from 'sveltestrap';

 export { className as class };
 let className = '';

 export let state = "ok";
 let color = "";
 $: {
     switch (state) {
         case "ok":
             color = "success";
             break;
         case "issue-flag":
         case "issue-statement":
         case "issue-mcq":
         case "issue-hint":
         case "issue-file":
         case "issue":
             color = "danger";
             break;
         case "orthograph":
         case "suggest":
             color = "info";
             break;
         case "too-hard":
         case "too-easy":
             color = "warning";
             break;
         default:
             color = "secondary";
             break;
     }
 }
</script>

<Badge {color} class={className}>
    {state}
</Badge>
