<script>
    import { onMount } from "svelte";
    import { querystring } from "svelte-spa-router";
    import { Button, Col, Row, Container } from "sveltestrap";

    import DragDrop from "@/components/DragDrop.svelte";

    import { storeConfig, storeLang, storeLocalesViews } from "@/stores/config.store";

    $: isReady = localesView;

    const view = "home";

    $: href = {
        form: "#/form?" + $querystring,
    };

    $: localesView = $storeLocalesViews[view];

    onMount(() => {
        const file = $storeConfig.views[view].locales[$storeLang];
        console.log(file);
        storeLocalesViews.setLocalesView(view, file);
    });
</script>

{#if isReady}
    <Container class="mt-5">
        <Row>
            <Col>
                <DragDrop />
            </Col>
        </Row>
    </Container>
{/if}
