import { i as require_react, u as __toESM } from "./theme.mnyG70gE.chunk.js";
import { cr as useQuery } from "./extends.CfN_tLZB.chunk.js";
import { Cc as $f7dceffc5ad7768b$export$4e328f61c538687f, Dc as $6179b936705e76d3$export$ae780daf29e6d456, Gc as $64fa3d84918910a7$export$29f1550f4b0d4415, Kc as $64fa3d84918910a7$export$4d86445c2cf5e3, Qr as dashboardQueries, Xc as $64fa3d84918910a7$export$df3a06d6289f983e, bl as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./merge.C77XY6IK.chunk.js";
//#region ../../node_modules/react-aria-components/dist/TextArea.mjs
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
var $216918bed6669f72$export$2dc6166a7e65358c = /* @__PURE__ */ (0, import_react.createContext)({});
var $216918bed6669f72$var$filterHoverProps = (props) => {
	let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
	return otherProps;
};
var $216918bed6669f72$export$f5c9f3c2c4054eec = /* @__PURE__ */ (0, import_react.forwardRef)(function TextArea(props, ref) {
	[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $216918bed6669f72$export$2dc6166a7e65358c);
	let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456(props);
	let { isFocused, isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f({
		isTextInput: true,
		autoFocus: props.autoFocus
	});
	let isInvalid = !!props["aria-invalid"] && props["aria-invalid"] !== "false";
	let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
		...props,
		values: {
			isHovered,
			isFocused,
			isFocusVisible,
			isDisabled: props.disabled || false,
			isInvalid
		},
		defaultClassName: "react-aria-TextArea"
	});
	return /* @__PURE__ */ import_react.createElement($64fa3d84918910a7$export$df3a06d6289f983e.textarea, {
		...$3ef42575df84b30b$export$9d1611c77c2fe928($216918bed6669f72$var$filterHoverProps(props), focusProps, hoverProps),
		...renderProps,
		ref,
		"data-focused": isFocused || void 0,
		"data-disabled": props.disabled || void 0,
		"data-hovered": isHovered || void 0,
		"data-focus-visible": isFocusVisible || void 0,
		"data-invalid": isInvalid || void 0
	});
});
//#endregion
//#region src/hooks/useDashboardPages.ts
function useDashboardPages() {
	return useQuery(dashboardQueries.listDashboardPages());
}
function useDashboardPageWidgets(dashboardPageId) {
	return useQuery(dashboardQueries.listDashboardPageWidgets(dashboardPageId));
}
//#endregion
//#region src/hooks/useFormatList.ts
var interleaveArrays = (...arrays) => Array.from({ length: Math.max(...arrays.map((array) => array.length)) }, (_, i) => arrays.map((array) => array[i])).flat();
function useFormatList(values, lng, opt = {}) {
	const formatter = (0, import_react.useMemo)(() => new Intl.ListFormat(lng, {
		style: "long",
		type: "conjunction",
		...opt
	}), [lng, opt]);
	return interleaveArrays((0, import_react.useMemo)(() => {
		const placeholders = Array.from({ length: values.length }, (_, i) => `<${i}>`);
		return formatter.format(placeholders).split(/<\d+>/g);
	}, [values.length, formatter]), values);
}
//#endregion
export { $216918bed6669f72$export$f5c9f3c2c4054eec as i, useDashboardPageWidgets as n, useDashboardPages as r, useFormatList as t };

//# sourceMappingURL=useFormatList.QRhmVUki.chunk.js.map