/**
 * 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/DecoratorDualButton/DecoratorDualButton.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 = "DecoratorDualButton";
/**
* The DecoratorDualButton groups a key/value pair where the key and value each behave like a button.
* @deprecated This component is deprecated
*/
let DecoratorDualButton = React.forwardRef((props, ref) => {
	const validProps = prepareProps(props, [
		"href",
		"kind",
		"onClick",
		"onContextMenu"
	]);
	return /* @__PURE__ */ React.createElement(DecoratorBase, {
		ref,
		...validProps,
		kind: "dual-button",
		...getDevtoolsProps(componentName)
	});
});
DecoratorDualButton.deprecated = {
	level: "warn",
	details: `This component is deprecated`
};
DecoratorDualButton = pkg.checkComponentEnabled(DecoratorDualButton, componentName);
DecoratorDualButton.displayName = componentName;
DecoratorDualButton.propTypes = {
	className: PropTypes.string,
	disabled: PropTypes.bool,
	hideIcon: PropTypes.bool,
	label: PropTypes.string,
	onClickLabel: PropTypes.func,
	onClickValue: PropTypes.func,
	onContextMenuLabel: PropTypes.func,
	onContextMenuValue: 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 { DecoratorDualButton };