#pragma once

/*
 * CosmicSDKExport.h
 *
 * Single source of truth for symbol visibility across the Cosmic SDK.
 * All public headers must include this file before using COSMICSDK_API.
 */

/* --------------------------------------------------------------------------
 * Guardrail: ensure COSMICSDK_API is defined in one place only
 * -------------------------------------------------------------------------- */
#ifdef COSMICSDK_API
#  undef COSMICSDK_API
#endif

/* --------------------------------------------------------------------------
 * Platform-specific symbol visibility
 * -------------------------------------------------------------------------- */
#if defined(_WIN32)

#  if defined(BUILDING_COSMICSDK_DLL)
/* Building the CosmicSDK DLL */
#    define COSMICSDK_API __declspec(dllexport)
#  else
/* Consuming the CosmicSDK DLL */
#    define COSMICSDK_API
#  endif

#else

/* Non-Windows platforms (Linux, macOS, embedded, etc.) */
#  define COSMICSDK_API

#endif
