/**
 * 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 { useWebTerminal } from "./hooks/index.js";
import React from "react";
import PropTypes from "prop-types";

//#region src/components/WebTerminal/WebTerminalContentWrapper.tsx
/**
* Copyright IBM Corp. 2022, 2022
*
* 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 componentName = "WebTerminalContentWrapper";
const blockClass = `${pkg.prefix}--web-terminal-content-wrapper`;
const WebTerminalContentWrapper = React.forwardRef(({ children, ...rest }, ref) => {
	const { open } = useWebTerminal();
	return /* @__PURE__ */ React.createElement("div", {
		ref,
		className: (0, import_classnames.default)([blockClass, { [`${blockClass}--open`]: open }]),
		...rest
	}, children);
});
WebTerminalContentWrapper.displayName = componentName;
WebTerminalContentWrapper.propTypes = { children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired };

//#endregion
export { WebTerminalContentWrapper };