/**
 * 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.
 */

import { __toESM } from "../../../_virtual/_rolldown/runtime.js";
import { require_classnames } from "../../../node_modules/classnames/index.js";
import { pkg } from "../../../settings.js";
import { getDevtoolsProps } from "../../../global/js/utils/devtools.js";
import { EmptyStateContent } from "../EmptyStateContent.js";
import { defaults } from "../EmptyState.js";
import { UnauthorizedIllustration } from "../assets/UnauthorizedIllustration.js";
import React from "react";
import PropTypes from "prop-types";
import { Button, Link } from "@carbon/react";
//#region src/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.tsx
/**
* Copyright IBM Corp. 2020, 2021
*
* 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__ */ __toESM(require_classnames());
const blockClass = `${pkg.prefix}--empty-state`;
const componentName = "UnauthorizedEmptyState";
/**
* 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 UnauthorizedEmptyState = React.forwardRef(({ action, className, illustrationPosition = defaults.position, illustrationTheme, illustrationDescription, link, size = defaults.size, headingAs, subtitle, title, ...rest }, ref) => {
	return /* @__PURE__ */ React.createElement("div", {
		...rest,
		className: (0, import_classnames.default)(blockClass, className, `${blockClass}-position--${illustrationPosition}`, `${blockClass}-type--unauthorized`),
		ref,
		...getDevtoolsProps(componentName)
	}, /* @__PURE__ */ React.createElement(UnauthorizedIllustration, {
		size,
		theme: illustrationTheme,
		alt: illustrationDescription || title
	}), /* @__PURE__ */ React.createElement(EmptyStateContent, {
		action,
		link,
		size,
		headingAs,
		subtitle,
		title: title || ""
	}));
});
UnauthorizedEmptyState.displayName = componentName;
UnauthorizedEmptyState.propTypes = {
	/**
	* Empty state action button
	*/
	action: PropTypes.shape({
		/**@ts-ignore*/
		...Button.propTypes,
		kind: PropTypes.oneOf([
			"primary",
			"secondary",
			"tertiary"
		]),
		renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
		/**@ts-ignore*/
		onClick: Button.propTypes.onClick,
		text: PropTypes.string
	}),
	/**
	* Provide an optional class to be applied to the containing node.
	*/
	className: PropTypes.string,
	/**
	* Empty state headingAs allows you to customize the type of heading element
	*/
	headingAs: PropTypes.elementType,
	/**
	* The alt text for empty state svg images. If not provided , title will be used.
	*/
	illustrationDescription: PropTypes.string,
	/**
	* Designates the position of the illustration relative to the content
	*/
	illustrationPosition: PropTypes.oneOf([
		"top",
		"right",
		"bottom",
		"left"
	]),
	/**
	* Empty state illustration theme variations.
	* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
	* based on your app's current theme value. Example:
	* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
	*/
	illustrationTheme: PropTypes.oneOf(["light", "dark"]),
	/**
	* Empty state link object
	*/
	/**@ts-ignore*/
	link: PropTypes.shape({
		...Link.propTypes,
		text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
		href: PropTypes.string
	}),
	/**
	* Empty state size
	*/
	size: PropTypes.oneOf(["lg", "sm"]),
	/**
	* Empty state subtitle
	*/
	subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
	/**
	* Empty state title
	*/
	title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired
};
//#endregion
export { UnauthorizedEmptyState };
