/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-f1f3d22 | Cube Dev Team */
import { mergeStyles } from "../utils/merge-styles.js";
import { createStaticStyle, isStaticStyle } from "./types.js";

//#region src/tasty/static/tastyStatic.ts
/**
* Build-time only function for zero-runtime static site generation.
*
* This function is transformed by the Babel plugin:
* - `tastyStatic(styles)` → StaticStyle object with className
* - `tastyStatic(base, styles)` → StaticStyle object with merged styles
* - `tastyStatic(selector, styles)` → removed entirely
*
* At runtime (during development/build), this function returns a placeholder.
* In production, all calls are replaced/removed by the build plugin.
*/
function tastyStatic(stylesOrBaseOrSelector, styles) {
	if (typeof stylesOrBaseOrSelector === "string") {
		console.warn(`[tasty] tastyStatic('${stylesOrBaseOrSelector}', styles) was called at runtime. This indicates the Babel plugin is not configured. Add @cube-dev/ui-kit/tasty/zero/babel to your Babel config.`);
		return;
	}
	if (isStaticStyle(stylesOrBaseOrSelector)) {
		console.warn("[tasty] tastyStatic(base, styles) was called at runtime. This indicates the Babel plugin is not configured. Add @cube-dev/ui-kit/tasty/zero/babel to your Babel config.");
		return createStaticStyle("__TASTY_STATIC_NOT_TRANSFORMED__", mergeStyles(stylesOrBaseOrSelector.styles, styles || {}));
	}
	console.warn("[tasty] tastyStatic(styles) was called at runtime. This indicates the Babel plugin is not configured. Add @cube-dev/ui-kit/tasty/zero/babel to your Babel config.");
	return createStaticStyle("__TASTY_STATIC_NOT_TRANSFORMED__", stylesOrBaseOrSelector);
}

//#endregion
export { tastyStatic };
//# sourceMappingURL=tastyStatic.js.map