/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b04eed0 | Cube Dev Team */
//#region src/utils/styles.ts
/**
* Split properties into style and non-style properties.
* Collects style-related props from `props` (based on `styleList`)
* and merges them with `defaultStyles` and `props.styles`.
*
* @param props - Component prop map.
* @param styleList - List of style property names to extract.
* @param defaultStyles - Default style map of the component.
* @param propMap - Props-to-style alias map (e.g. `{ bg: 'fill' }`).
* @param ignoreList - Properties to skip during extraction.
*/
function extractStyles(props, styleList = [], defaultStyles, propMap, ignoreList = []) {
	const ignoreSet = new Set(ignoreList);
	const styleSet = new Set(styleList);
	const styles = {
		...defaultStyles,
		...!ignoreSet.has("styles") && props.styles && typeof props.styles === "object" ? props.styles : void 0
	};
	for (const prop of Object.keys(props)) {
		if (ignoreSet.has(prop)) continue;
		const styleName = propMap?.[prop] ?? prop;
		if (styleSet.has(styleName)) styles[styleName] = props[prop];
	}
	return styles;
}

//#endregion
export { extractStyles };
//# sourceMappingURL=styles.js.map