//#region src/components/atoms/forms/_shared/field-props.ts
/**
* List of field prop keys to destructure out of combined props.
*/
var FIELD_PROP_KEYS = [
	"label",
	"required",
	"labelIcon",
	"tooltip",
	"topRight",
	"description",
	"bottomRight",
	"error",
	"fieldClassName"
];
/** Check whether any field prop is set, meaning the control should wrap in Field. */
function hasFieldProps(props) {
	return !!(props.label || props.error || props.description || props.topRight || props.bottomRight);
}
/**
* Separate field props from control props.
* Returns [fieldProps, controlProps].
*/
function splitFieldProps(props) {
	const fieldProps = {};
	const controlProps = {};
	for (const [key, value] of Object.entries(props)) if (FIELD_PROP_KEYS.includes(key)) fieldProps[key] = value;
	else controlProps[key] = value;
	return [fieldProps, controlProps];
}
//#endregion
export { hasFieldProps, splitFieldProps };

//# sourceMappingURL=index20.js.map