'use strict';
import { apiOkResponse } from '../../meta/server/web/responses.js';
import { resetCurrentWorkspaceId } from '../../meta/server/providers/current-workspace-id-provider.js';
import { createCookie, serializeCookie } from '../../../fd-toolbox/server/auth/cookies.js';
import { sessionCookieName } from '../../meta/server/auth/session-validation.js';
import { fdServerCacheKeys } from '../../../fd-toolbox/server/constants/fd-server-cache-keys.js';
import { getSessionToken } from '../../meta/server/auth/session-access.js';
import { removeFromCoreCache } from '../../../fd-toolbox/server/cachings/core-cache.js';
import { httpHeaders } from '../../../fd-toolbox/server/constants/workspace-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x379a03,_0x4e01ed)=>__defProp(_0x379a03,'name',{'value':_0x4e01ed,'configurable':!![]});async function signOutGetRoute(){resetCurrentWorkspaceId();const _0x1b5cb5=await getSessionToken();_0x1b5cb5&&await removeFromCoreCache(fdServerCacheKeys['pageAuth'],_0x1b5cb5);const _0x1cb1a7=createCookie(sessionCookieName,'',{'path':'/','maxAge':'0'});return apiOkResponse({},{[httpHeaders['setCookie']]:serializeCookie(_0x1cb1a7)});}__name(signOutGetRoute,'signOutGetRoute');

export { signOutGetRoute };
