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

//#region src/components/ProductiveCard/ProductiveCard.tsx
const componentName = "ProductiveCard";
const ProductiveCard = forwardRef(({ actionsPlacement = "top", children, ...rest }, ref) => {
	const validProps = prepareProps(rest, [
		"media",
		"mediaPosition",
		"pictogram",
		"primaryButtonClick",
		"productive",
		"secondaryButtonKind"
	]);
	return /* @__PURE__ */ React.createElement(Card, {
		...validProps,
		actionsPlacement,
		ref,
		productive: true,
		...getDevtoolsProps(componentName)
	}, children);
});
ProductiveCard.propTypes = {
	actionIcons: PropTypes.arrayOf(PropTypes.shape({
		id: PropTypes.string,
		icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
		onKeyDown: PropTypes.func,
		onClick: PropTypes.func,
		iconDescription: PropTypes.string,
		href: PropTypes.string,
		link: PropTypes.shape({ href: PropTypes.string.isRequired })
	})),
	actionsPlacement: PropTypes.oneOf(["top", "bottom"]),
	children: PropTypes.node,
	className: PropTypes.string,
	clickZone: PropTypes.oneOf([
		"one",
		"two",
		"three"
	]),
	decorator: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
	description: PropTypes.oneOfType([
		PropTypes.string,
		PropTypes.object,
		PropTypes.node
	]),
	iconDescription: PropTypes.string,
	label: PropTypes.oneOfType([
		PropTypes.string,
		PropTypes.object,
		PropTypes.node
	]),
	onClick: PropTypes.func,
	onPrimaryButtonClick: PropTypes.func,
	onSecondaryButtonClick: PropTypes.func,
	overflowActions: PropTypes.arrayOf(PropTypes.shape({
		id: PropTypes.string,
		itemText: PropTypes.string,
		onClick: PropTypes.func,
		onKeyDown: PropTypes.func
	})),
	overflowAriaLabel: PropTypes.string,
	primaryButtonDisabled: PropTypes.bool,
	primaryButtonHref: PropTypes.string,
	primaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
	primaryButtonPlacement: PropTypes.oneOf(["top", "bottom"]),
	primaryButtonText: PropTypes.node,
	secondaryButtonHref: PropTypes.string,
	secondaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
	secondaryButtonPlacement: PropTypes.oneOf(["top", "bottom"]),
	secondaryButtonText: PropTypes.node,
	slug: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
	title: PropTypes.oneOfType([
		PropTypes.string,
		PropTypes.object,
		PropTypes.node
	]),
	titleSize: PropTypes.oneOf(["default", "large"])
};
ProductiveCard.displayName = componentName;

//#endregion
export { ProductiveCard };