/**
 * Copyright IBM Corp. 2020, 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

const require_runtime = require('./_virtual/_rolldown/runtime.js');
const require_package_settings = require('./global/js/package-settings.js');
const require_Canary = require('./components/_Canary/Canary.js');
const require_pconsole = require('./global/js/utils/pconsole.js');
let react = require("react");
react = require_runtime.__toESM(react);
let _carbon_themes = require("@carbon/themes");

//#region src/settings.js
/**
* Copyright IBM Corp. 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const carbon = {
	get themes() {
		return _carbon_themes.themes;
	},
	prefix: "cds"
};
const componentDeprecatedWarning = (name, details) => `Carbon for IBM Products (WARNING): Component "${name}" is deprecated. ${details}`;
require_package_settings.default.logDeprecated = (component, name) => {
	if (component?.deprecated) {
		const { level, details } = component.deprecated;
		(require_pconsole.default?.[level] ?? require_pconsole.default.error)(componentDeprecatedWarning(name || component.displayName, details));
	}
};
require_package_settings.default.checkComponentEnabled = (component, name) => {
	if (component.render) {
		const forward = react.default.forwardRef((props, ref) => {
			require_package_settings.default.logDeprecated(component, name);
			return (forward.render = require_package_settings.default.isComponentEnabled(name) || !require_package_settings.default.isComponentPublic(name) ? component.render : require_Canary.Canary.bind(void 0, { componentName: name }))(props, ref);
		});
		return Object.assign({}, component, { displayName: component.displayName }, forward);
	} else {
		let render = (props) => {
			require_package_settings.default.logDeprecated(component, name);
			return (render = require_package_settings.default.isComponentEnabled(name) || !require_package_settings.default.isComponentPublic(name) ? component : require_Canary.Canary.bind(void 0, { componentName: name }))(props);
		};
		return Object.assign((props) => render(props), component, { displayName: component.displayName });
	}
};
const pkg = require_package_settings.default;

//#endregion
exports.carbon = carbon;
exports.pkg = pkg;