// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0
'use server';

import { cookies } from 'next/headers';

export async function setStationCookie(stationId: string, stationData: any) {
  const cookieStore = await cookies();
  cookieStore.set('station-data', JSON.stringify(stationData || null), {
    httpOnly: false,
    secure: false,
    sameSite: 'lax',
    maxAge: 60,
    path: `/charging-stations/${stationId}`,
  });
}
