/**
 * 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 { pkg } from "../../settings.js";
import { getDevtoolsProps } from "../../global/js/utils/devtools.js";
import { prepareProps } from "../../global/js/utils/props-helper.js";
import { DecoratorBase } from "../DecoratorBase/DecoratorBase.js";
import React from "react";
import PropTypes from "prop-types";

//#region src/components/DecoratorLink/DecoratorLink.jsx
/**
* Copyright IBM Corp. 2024, 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 componentName = "DecoratorLink";
/**
* The DecoratorLink groups a key/value pair to behave like a link.
* @deprecated This component is deprecated
*/
let DecoratorLink = React.forwardRef((props, ref) => {
	const validProps = prepareProps(props, [
		"disabled",
		"kind",
		"onClickLabel",
		"onClickValue",
		"onContextMenuLabel",
		"onContextMenuValue"
	]);
	return /* @__PURE__ */ React.createElement(DecoratorBase, {
		ref,
		...validProps,
		kind: "link",
		...getDevtoolsProps(componentName)
	});
});
DecoratorLink.deprecated = {
	level: "warn",
	details: `This component is deprecated`
};
DecoratorLink = pkg.checkComponentEnabled(DecoratorLink, componentName);
DecoratorLink.displayName = componentName;
DecoratorLink.propTypes = {
	className: PropTypes.string,
	hideIcon: PropTypes.bool,
	href: PropTypes.string.isRequired,
	label: PropTypes.string,
	onClick: PropTypes.func,
	onContextMenu: PropTypes.func,
	score: PropTypes.number,
	scoreThresholds: PropTypes.arrayOf(PropTypes.number),
	setLabelTitle: PropTypes.func,
	small: PropTypes.bool,
	theme: PropTypes.oneOf(["light", "dark"]),
	truncateValue: PropTypes.oneOfType([PropTypes.oneOf(["end", "start"]), PropTypes.shape({
		maxLength: PropTypes.number,
		front: PropTypes.number,
		back: PropTypes.number
	})]),
	value: PropTypes.string.isRequired,
	valueTitle: PropTypes.string
};

//#endregion
export { DecoratorLink };