<script setup lang="ts">
import { setCookie } from "@/lib/cookies";
import { useI18n } from "vue-i18n";

const i18n = useI18n();

function onSetLang(lang: string) {
    i18n.locale.value = lang;
    setCookie("lang", lang);
}
</script>

<template>
    <a href="#" @click.prevent="onSetLang('fr')">🇫🇷</a> /
    <a href="#" @click.prevent="onSetLang('en')">🇺🇸</a>
</template>
