"use client";
const require_use_accordion_context = require("./use-accordion-context.cjs");
const require_use_accordion_item_props_context = require("./use-accordion-item-props-context.cjs");
const require_factory = require("../factory.cjs");
const require_use_collapsible_context = require("../collapsible/use-collapsible-context.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/accordion/accordion-item-trigger.tsx
var AccordionItemTrigger = (0, react.forwardRef)((props, ref) => {
	const accordion = require_use_accordion_context.useAccordionContext();
	const itemProps = require_use_accordion_item_props_context.useAccordionItemPropsContext();
	const collapsible = require_use_collapsible_context.useCollapsibleContext();
	const triggerProps = accordion.getItemTriggerProps(itemProps);
	const mergedProps = (0, _zag_js_react.mergeProps)({
		...triggerProps,
		"aria-controls": collapsible.isUnmounted ? void 0 : triggerProps["aria-controls"]
	}, props);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
		...mergedProps,
		ref
	});
});
AccordionItemTrigger.displayName = "AccordionItemTrigger";
//#endregion
exports.AccordionItemTrigger = AccordionItemTrigger;
