<script lang="ts">
    export let logo:string;
    export let logoWidths: string = "10%";
    
    export let fontSize: string = "3mm";
    export let lineHeight: string = "3.1mm";

    import { onMount } from "svelte";
    onMount(() => {
        imageCaption = logo.split(/(\\|\/)/g).pop();
    });

    let imageCaption: undefined | string; // Not a high piority, you get the file name and thats it
</script>

<div class="container">
    <img src={logo} class="" alt="{imageCaption}" width="{logoWidths}"/>
    <div style="line-height: {lineHeight};">
        <span style="font-size: {fontSize};">
            <slot/>
        </span>
    </div>
</div>

<style lang="scss">
    .container {
        display: flex;
        justify-items: start;

        width: 100%;

        & > div {
            padding-left: 3mm;

            text-align: start;
        }

        & > img {
            border-radius: 2.5mm;
            filter: drop-shadow(1mm 1mm 1mm #0000009d);
        }
    }
</style>