import { cookies } from "next/headers"

import { SAS_TOKEN_STORAGE_KEY } from "@/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/sasUtils"

export async function getSasToken() {
  const cookieStore = await cookies()
  const tokenCookie = cookieStore.get(SAS_TOKEN_STORAGE_KEY)
  const sasAuthToken = tokenCookie?.value

  return sasAuthToken
}
