<script lang="ts">
    import CookieSet from "../CookieSet.svelte"
    const setHeight = (element: HTMLElement) => {
        element.style.height = (element.offsetWidth / 16) * 9 + "px"
    }
</script>

<CookieSet cookieName="{'googleMaps'}" textPosition="{'unten'}" background="{'rgba(44, 44, 44, 0.4)'}">
    <iframe
        title="Google Maps"
        use:setHeight
        id="iframe"
        src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2512.077224708092!2d11.023318016007138!3d50.97776317955154!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47a4729650047377%3A0xca0e03f621729448!2sWebmakers%20GmbH!5e0!3m2!1sde!2sde!4v1571866765252!5m2!1sde!2sde"
        style="border:0;"
        allowfullscreen="{true}"
        loading="lazy"
        referrerpolicy="no-referrer-when-downgrade"
    ></iframe>
</CookieSet>

<style>
    iframe {
        width: 100%;
        max-width: 100%;
        border: 0;
    }
</style>
