<script>
 import {
     Icon,
     Modal,
     ModalBody,
     ModalHeader
 } from '@sveltestrap/sveltestrap';
 const toggle = () => (open = !open);

 export let exercice = null;
 export let open = false;
 export let resolution;
</script>

<Modal isOpen={open} {toggle} size="xl">
    <ModalHeader {toggle} class="bg-success text-light">
        <Icon name="laptop-fill" />
        Solution du défi
        {#if exercice}
            : {exercice.title}
        {/if}
    </ModalHeader>
    <ModalBody>
        {@html resolution}
    </ModalBody>
</Modal>
