/**
 * 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_index = require('../../node_modules/classnames/index.js');
const require_settings = require('../../settings.js');
const require_devtools = require('../../global/js/utils/devtools.js');
require('../../global/js/utils/props-helper.js');
const require_EmptyStateV2_deprecated = require('./EmptyStateV2.deprecated.js');
const require_EmptyStateContent = require('./EmptyStateContent.js');
let react = require("react");
react = require_runtime.__toESM(react);
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);
let _carbon_react = require("@carbon/react");

//#region src/components/EmptyStates/EmptyState.tsx
/**
* Copyright IBM Corp. 2020, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
const blockClass = `${require_settings.pkg.prefix}--empty-state`;
const componentName = "EmptyState";
var sizes = /* @__PURE__ */ function(sizes) {
	sizes["lg"] = "lg";
	sizes["sm"] = "sm";
	return sizes;
}(sizes || {});
const defaults = {
	position: "top",
	size: sizes.lg
};
/**
* The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
*/
const EmptyState = react.default.forwardRef(({ v2 = false, ...props }, ref) => {
	if (v2) return /* @__PURE__ */ react.default.createElement(require_EmptyStateV2_deprecated.EmptyStateV2, props);
	const { action, className, illustration, illustrationDescription, illustrationPosition = defaults.position, link, size = defaults.size, headingAs, subtitle, title, ...rest } = props;
	return /* @__PURE__ */ react.default.createElement("div", {
		...rest,
		className: (0, import_classnames.default)(blockClass, `${blockClass}-type--default`, className, { [`${blockClass}-position--${illustrationPosition}`]: !!illustration }),
		ref,
		...require_devtools.getDevtoolsProps(componentName)
	}, illustration && /* @__PURE__ */ react.default.createElement("img", {
		src: illustration,
		alt: illustrationDescription,
		className: (0, import_classnames.default)([`${blockClass}__illustration`, `${blockClass}__illustration--${size}`]),
		"aria-hidden": "true"
	}), /* @__PURE__ */ react.default.createElement(require_EmptyStateContent.EmptyStateContent, {
		action,
		link,
		size,
		headingAs,
		subtitle,
		title: title ?? ""
	}));
});
EmptyState.propTypes = {
	action: prop_types.default.shape({
		..._carbon_react.Button.propTypes,
		kind: prop_types.default.oneOf([
			"primary",
			"secondary",
			"tertiary"
		]),
		renderIcon: prop_types.default.oneOfType([prop_types.default.func, prop_types.default.object]),
		onClick: _carbon_react.Button.propTypes.onClick,
		text: prop_types.default.string
	}),
	className: prop_types.default.string,
	headingAs: prop_types.default.elementType,
	illustration: prop_types.default.string,
	illustrationDescription: prop_types.default.string,
	illustrationPosition: prop_types.default.oneOf([
		"top",
		"right",
		"bottom",
		"left"
	]),
	link: prop_types.default.any,
	size: prop_types.default.oneOf(["lg", "sm"]),
	subtitle: prop_types.default.node,
	title: prop_types.default.node.isRequired,
	v2: prop_types.default.bool
};
EmptyState.displayName = componentName;

//#endregion
exports.EmptyState = EmptyState;
exports.defaults = defaults;