/**
 * 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_devtools = require('../../global/js/utils/devtools.js');
const require_props_helper = require('../../global/js/utils/props-helper.js');
const require_TearsheetShell = require('./TearsheetShell.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/Tearsheet/Tearsheet.tsx
/**
* Copyright IBM Corp. 2020, 2023
*
* 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 = "Tearsheet";
/**
* A tearsheet is a mostly full-screen type of dialog that keeps users
* in-context and focused by bringing actionable content front and center while
* revealing parts of the UI behind it. There is also a narrow variant of the
* tearsheet.
*
* A tearsheet comprises up to 5 zones, allowing for flexibility depending on
* the content: a heading area including a title, an optional navigation area
* that sits just below the heading, an optional influencer which is a side
* panel on either the left or right side, the main content area, and a set of
* action buttons.
*/
const Tearsheet = react.default.forwardRef((props, ref) => {
	const { influencerPosition = "left", influencerWidth = "narrow", children, ...rest } = props;
	return /* @__PURE__ */ react.default.createElement(require_TearsheetShell.TearsheetShell, {
		...require_devtools.getDevtoolsProps(componentName),
		...rest,
		influencerPosition,
		influencerWidth,
		ref,
		size: "wide"
	}, children);
});
Tearsheet.displayName = componentName;
const deprecatedProps = { verticalPosition: prop_types.default.oneOf(["normal", "lower"]) };
Tearsheet.propTypes = {
	actions: require_props_helper.allPropTypes([prop_types.default.arrayOf(prop_types.default.shape({
		..._carbon_react.Button.propTypes,
		kind: prop_types.default.oneOf([
			"ghost",
			"danger--ghost",
			"secondary",
			"danger",
			"primary"
		]),
		label: prop_types.default.string,
		loading: prop_types.default.bool,
		onClick: _carbon_react.Button.propTypes.onClick
	}))]),
	ariaLabel: prop_types.default.string,
	className: prop_types.default.string,
	closeIconDescription: prop_types.default.string,
	description: prop_types.default.node,
	hasCloseIcon: prop_types.default.bool,
	headerActions: prop_types.default.element,
	influencer: prop_types.default.element,
	influencerPosition: prop_types.default.oneOf(["left", "right"]),
	influencerWidth: prop_types.default.oneOf(["narrow", "wide"]),
	label: prop_types.default.node,
	launcherButtonRef: prop_types.default.any,
	navigation: prop_types.default.element,
	onClose: prop_types.default.func,
	open: prop_types.default.bool,
	portalTarget: require_TearsheetShell.portalType,
	selectorPrimaryFocus: prop_types.default.string,
	selectorsFloatingMenus: prop_types.default.arrayOf(prop_types.default.string),
	title: prop_types.default.node,
	...deprecatedProps
};

//#endregion
exports.Tearsheet = Tearsheet;