/**
 * 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_index = require('../../../node_modules/classnames/index.js');
const require_ActionSet = require('../../ActionSet/ActionSet.js');
const require_context = require('./context.js');
let react = require("react");
react = require_runtime.__toESM(react);

//#region src/components/Tearsheet/next/TearsheetFooter.tsx
/**
* Copyright IBM Corp. 2025, 2025
*
* 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__ */ require_runtime.__toESM(require_index.default);
const TearsheetFooter = (0, react.forwardRef)(({ children, className, actions, buttonSize }, ref) => {
	const { variant } = (0, react.useContext)(require_context.TearsheetContext);
	const actionCount = actions?.length || 0;
	return /* @__PURE__ */ react.default.createElement("footer", {
		className: (0, import_classnames.default)(`${require_context.blockClass}__footer`, className, {
			[`${require_context.blockClass}__footer--three-actions`]: actionCount == 3,
			[`${require_context.blockClass}__footer--many-actions`]: actionCount > 3
		}),
		ref
	}, children, actions && actions.length > 0 && /* @__PURE__ */ react.default.createElement(require_ActionSet.ActionSet, {
		actions,
		buttonSize,
		disableStacking: true,
		size: variant == "wide" ? "2xl" : "lg"
	}));
});
TearsheetFooter.displayName = "TearsheetFooter";

//#endregion
exports.default = TearsheetFooter;