"use server"; import { cookies } from "next/headers"; import { Language } from "@/types/api"; export async function setLanguages(sourceLang: Language, targetLang: Language) { const store = await cookies(); store.set("sourceLang", sourceLang, { path: "/", maxAge: 60 * 60 * 24 * 365 }); store.set("targetLang", targetLang, { path: "/", maxAge: 60 * 60 * 24 * 365 }); }