/**
 * 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_EmptyStateIllustration_deprecated = require('./EmptyStateIllustration.deprecated.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/EmptyStateV2.deprecated.tsx
/**
* Copyright IBM Corp. 2023, 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.
*/
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
const blockClass = `${require_settings.pkg.prefix}--empty-state`;
const componentName = "EmptyStateV2";
/**
* This is the V2 version of the `EmptyState` component. To use you must pass the `v2` prop to the V1 version of the component `EmptyState` and use the props below.
* In order to avoid breaking changes in the future `EmptyStateV2` is not actually directly importable.
* @deprecated
*/
const EmptyStateV2 = react.default.forwardRef((props, ref) => {
	const { action, className, illustration: customIllustration, illustrationDescription, illustrationPosition = "top", illustrationTheme, kind, link, size = "lg", subtitle, title, ...rest } = props;
	const illustrationProps = {
		size,
		theme: illustrationTheme,
		title: illustrationDescription,
		kind
	};
	return /* @__PURE__ */ react.default.createElement("div", {
		...rest,
		className: (0, import_classnames.default)([
			blockClass,
			className,
			`${blockClass}-position--${illustrationPosition}`,
			{ [`${blockClass}-type--${kind}`]: kind }
		]),
		ref,
		...require_devtools.getDevtoolsProps(componentName)
	}, customIllustration && /* @__PURE__ */ react.default.createElement("img", {
		src: customIllustration,
		alt: illustrationDescription,
		className: (0, import_classnames.default)([`${blockClass}__illustration`, `${blockClass}__illustration--${size}`])
	}), !customIllustration && kind && /* @__PURE__ */ react.default.createElement(require_EmptyStateIllustration_deprecated.default, illustrationProps), /* @__PURE__ */ react.default.createElement("div", { className: `${blockClass}__content` }, /* @__PURE__ */ react.default.createElement("h3", { className: (0, import_classnames.default)(`${blockClass}__header`, { [`${blockClass}__header--small`]: size === "sm" }) }, title), subtitle && /* @__PURE__ */ react.default.createElement("div", { className: (0, import_classnames.default)(`${blockClass}__subtitle`, { [`${blockClass}__subtitle--small`]: size === "sm" }) }, subtitle), action && /* @__PURE__ */ react.default.createElement(_carbon_react.Button, {
		...action,
		className: `${blockClass}__action-button`,
		size: "sm"
	}, action.text), link && /* @__PURE__ */ react.default.createElement(_carbon_react.Link, {
		...link,
		className: `${blockClass}__link`
	}, link.text)));
});
/**@ts-ignore*/
EmptyStateV2.deprecated = {
	level: "warn",
	details: "For more information, please refer to the Carbon docs https://carbondesignsystem.com/patterns/empty-states-pattern/"
};
EmptyStateV2.propTypes = {
	action: prop_types.default.PropTypes.shape({ text: prop_types.default.string }),
	className: prop_types.default.string,
	illustration: prop_types.default.string,
	illustrationDescription: prop_types.default.string,
	illustrationPosition: prop_types.default.oneOf([
		"top",
		"right",
		"bottom",
		"left"
	]),
	illustrationTheme: prop_types.default.oneOf(["light", "dark"]),
	kind: prop_types.default.oneOf([
		"error",
		"noData",
		"noTags",
		"notFound",
		"notifications",
		"unauthorized"
	]),
	link: prop_types.default.shape({ text: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]) }),
	size: prop_types.default.oneOf(["sm", "lg"]),
	subtitle: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]),
	title: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]).isRequired
};
EmptyStateV2.displayName = componentName;

//#endregion
exports.EmptyStateV2 = EmptyStateV2;