<script lang="ts">
    import { getContext } from 'svelte'
    // Components
    import EmailForm from '$components/molecules/EmailForm.svelte'

    export let theme: string = 'default'

    const { settings: { newsletter_text, newsletter_subtitle }}: any = getContext('global')
</script>

<div class="newsletter newsletter--{theme} shadow-box-dark">
    <div class="newsletter__wrapper">
        <h3 class="title-medium">
            <label for="SUB_EMAIL">{newsletter_subtitle}</label>
        </h3>
        <p class="text-small">{newsletter_text}</p>

        <EmailForm past={true} />
    </div>
</div>